// update conversations private void OldReply(string interlocutor, ConversationReply reply) { if (SelectedFriend != null && interlocutor == SelectedFriend.Name) { RepliesList.Insert(0, new Reply(reply, client.Name)); } }
// update conversations private void NewReply(string interlocutor, ConversationReply reply) { if (SelectedFriend != null && interlocutor == SelectedFriend.Name) { RepliesList.Add(new Reply(reply, client.Name)); } else { Friend f = FriendsList.FirstOrDefault(x => x.Name.Equals(interlocutor)); if (f != null) { f.HasUnreadMessages = true; } } }