Inheritance: ViewModelBase
        public ComposeViewModel(IBaconProvider baconProvider, MessageViewModel replyMessage = null)
        {
            _baconProvider = baconProvider;
            _userService = baconProvider.GetService<IUserService>();
            _redditService = baconProvider.GetService<IRedditService>();
            _navigationService = baconProvider.GetService<INavigationService>();
            _dynamicViewLocator = baconProvider.GetService<IDynamicViewLocator>();
            _notificationService = baconProvider.GetService<INotificationService>();
            _refreshUser = new RelayCommand(RefreshUserImpl);
            _send = new RelayCommand(SendImpl);

            RefreshUserImpl();

            if (replyMessage != null)
            {
                IsReply = true;
                _replyMessage = replyMessage;
                _subject = _replyMessage.Subject;
                _recipient = _replyMessage.Author;
            }
        }
 private void MaybeToastNewMessage(MessageViewModel viewModel)
 {
     lock (this)
     {
         if (!_alreadyToastedMessages.Contains(viewModel.Id))
         {
             _alreadyToastedMessages.Add(viewModel.Id);
             _liveTileService.SetMessageRead(viewModel.Id);
             var newMessageCount = _messages.OfType<MessageViewModel>().Count(message => message.IsNew);
             _liveTileService.SetCount(newMessageCount);
             _notificationService.CreateNotificationWithNavigation("New Message: " + viewModel.Preview, _baconProvider.GetService<IDynamicViewLocator>().MessagesView, null);
             HasMail = true;
         }
     }
 }