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); }
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; }); }); }