Exemplo n.º 1
0
        private async void InsertData()
        {
            List<IResultItem> uploads = AppData.Session.ResultsToUpload;

            if (uploads == null || uploads.Count == 0) return;

            List<IFeedItem> feedback = await ServerData.FetchFeedbackFor(uploads[0].Id);

            FeedCardAdapter adapter = new FeedCardAdapter(feedback, Activity);
            recList.SetAdapter(adapter);
        }
Exemplo n.º 2
0
        private async void InsertData()
        {
            Activity.RunOnUiThread(() => { refresher.Post(() => { refresher.Refreshing = true; }); });

            List<IFeedItem> existing = AppData.Session.CurrentFeed;

            if (existing != null)
            {
                adapter = new FeedCardAdapter(AppData.Session.CurrentFeed, Activity);
                feedList.SetAdapter(adapter);
            }

            if(adapter == null) adapter = new FeedCardAdapter(new List<IFeedItem>(), Activity );

            await FetchFeed(existing);

            SwipeableRecyclerViewTouchListener swipeTouchListener = new SwipeableRecyclerViewTouchListener(feedList,
                this, Activity);
            feedList.AddOnItemTouchListener(swipeTouchListener);

            Activity.RunOnUiThread(() => { refresher.Post(() => { refresher.Refreshing = false; }); });
        }