Ejemplo n.º 1
0
        public void LoadIssueComments()
        {
            var loadComments = _storage.GetIssueComments(_issueNumber);

#if DEBUG
            Action onCompleted = () =>
            {
                UiExtensions.RunOnUi(() =>
                {
                    Toast.MakeText(this.Context, "Comentarios cargados", ToastLength.Long).Show();
                });
            };
            loadComments.Subscribe(ResetComments, onCompleted: onCompleted);
                        #else
            loadComments.Subscribe(ResetComments);
#endif
        }
Ejemplo n.º 2
0
        //bool cachedComments = true;
        void ResetComments(IReadOnlyList <IssueComment> comments)
        {
            //System.Diagnostics.Debug.WriteLine($"LoadIssueComments {cachedComments}");
            //if (cachedComments)
            //{
            //    cachedComments = false;
            //    return;
            //}

            var adapter = new IssueCommentsAdapter(comments.ToList());

            using (var h = new Handler(Looper.MainLooper))
                h.Post(() =>
                {
                    UiExtensions.RunOnUi(() =>
                    {
                        commentsView.SetAdapter(adapter);
                    });
                });
        }
Ejemplo n.º 3
0
 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     return(UiExtensions.CreateImgSource($"Stages/{(int)value}.jpg"));
 }