Ejemplo n.º 1
0
 public void PostSelected(RedditPostItemViewModel redditPostItemViewModel)
 {
     this.Id        = redditPostItemViewModel.Id;
     this.Title     = redditPostItemViewModel.Title;
     this.Thumbnail = redditPostItemViewModel.Thumbnail;
     if (this.redditPostLogic.ReadPost(redditPostItemViewModel.Base))
     {
         redditPostItemViewModel.ItWasRead = true;
     }
 }
Ejemplo n.º 2
0
        public async void DismissPost(RedditPostItemViewModel redditPostItemViewModel)
        {
            var redditPost = mapper.Map <RedditPost>(redditPostItemViewModel);
            var res        = this.redditPostLogic.DismissPost(redditPost);

            if (res)
            {
                this.Posts.Remove(redditPostItemViewModel);
            }
            else
            {
                var messageDialog = new MessageDialog("The post could not be discarded, try again later.");
                await messageDialog.ShowAsync();
            }
        }