public void MarkAsRead(IncomingMessage msg) { msg.IsRead = true; NotifyPropertyChanged("UnreadMessagesCount"); }
public void GotMessage(string username, string address, string message,Guid guid) { var contactViewModel = FindContactViewModel(username, address); if (contactViewModel != null) { if (!contactViewModel.Contact.Messages.Any(x => x.Guid == guid)) { var m = new IncomingMessage { Guid = guid, Text = message, TimeStamp = DateTime.Now }; contactViewModel.AddMessage(m); // todo : send confirm } } }