Exemple #1
0
        public async Task Dismiss(RedditPostViewModel selectedItem)
        {
            if (RedditPosts.Contains(selectedItem))
            {
                RedditPosts.Remove(selectedItem);
            }

            //On Dismiss fetch new posts
            //NOTE: If item dismissed is the last item, the same post will come from the API everytime.
            await GetData();
        }
Exemple #2
0
        public void SelectPost(RedditPostViewModel selectedItem)
        {
            //Only set property if new item was selected
            if (selectedItem != null)
            {
                if (SelectedPost != selectedItem)
                {
                    SelectedPost = selectedItem;
                }

                SelectedPost.MarkAsRead();
            }
        }