Ejemplo n.º 1
0
 protected override void OnPause()
 {
     try
     {
         base.OnPause();
         AddOrRemoveEvent(false);
         MainRecyclerView?.StopVideo();
     }
     catch (Exception e)
     {
         Methods.DisplayReportResultTrack(e);
     }
 }
Ejemplo n.º 2
0
 protected override void OnStop()
 {
     try
     {
         base.OnStop();
         MainRecyclerView?.StopVideo();
     }
     catch (Exception e)
     {
         Methods.DisplayReportResultTrack(e);
     }
 }
        //Refresh
        public void SwipeRefreshLayoutOnRefresh(object sender, EventArgs e)
        {
            try
            {
                PopupBubbleView.Visibility = ViewStates.Gone;

                PostFeedAdapter.ListDiffer.Clear();
                PostFeedAdapter.NotifyDataSetChanged();

                PostFeedAdapter?.HolderStory?.StoryAdapter?.StoryList?.Clear();
                PostFeedAdapter?.HolderStory?.StoryAdapter?.NotifyDataSetChanged();

                MainRecyclerView?.StopVideo();

                var combiner = new FeedCombiner(null, PostFeedAdapter.ListDiffer, Activity);

                combiner.AddPostBoxPostView("feed", -1);

                switch (AppSettings.ShowStory)
                {
                case true:
                    combiner.AddStoryPostView("feed", -1);
                    break;
                }

                //combiner.AddPostBoxPostView("feed", -1);

                var checkSectionAlertBox = PostFeedAdapter.ListDiffer.FirstOrDefault(a => a.TypeView == PostModelType.AlertBox);
                {
                    PostFeedAdapter.ListDiffer.Remove(checkSectionAlertBox);
                }

                var checkSectionAlertJoinBox = PostFeedAdapter.ListDiffer.Where(a => a.TypeView == PostModelType.AlertJoinBox).ToList();
                {
                    foreach (var adapterModelsClass in checkSectionAlertJoinBox)
                    {
                        PostFeedAdapter.ListDiffer.Remove(adapterModelsClass);
                    }
                }

                PostFeedAdapter.NotifyDataSetChanged();

                StartApiService();
            }
            catch (Exception exception)
            {
                Methods.DisplayReportResultTrack(exception);
            }
        }
Ejemplo n.º 4
0
        //Refresh
        private void SwipeRefreshLayoutOnRefresh(object sender, EventArgs e)
        {
            try
            {
                PostFeedAdapter.ListDiffer.Clear();

                MainRecyclerView?.StopVideo();

                var combiner = new FeedCombiner(null, PostFeedAdapter.ListDiffer, Activity);

                if (AppSettings.ShowStory)
                {
                    combiner.AddStoryPostView();
                }

                combiner.AddPostBoxPostView("feed", -1);

                var checkSectionAlertBox = PostFeedAdapter.ListDiffer.FirstOrDefault(a => a.TypeView == PostModelType.AlertBox);
                {
                    PostFeedAdapter.ListDiffer.Remove(checkSectionAlertBox);
                }

                var checkSectionAlertJoinBox = PostFeedAdapter.ListDiffer.Where(a => a.TypeView == PostModelType.AlertJoinBox).ToList();
                {
                    foreach (var adapterModelsClass in checkSectionAlertJoinBox)
                    {
                        PostFeedAdapter.ListDiffer.Remove(adapterModelsClass);
                    }
                }

                PostFeedAdapter.NotifyDataSetChanged();

                StartApiService();
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }