/// <summary> /// Creates a conversation for a contact. /// </summary> /// <param name="contact">The contact.</param> /// <param name="message">The message.</param> public void CreateConversation(UserViewModel contact, Message message) { var conversation = new Conversation(contact); conversation.Messages.Add(message); AllConversations.Add(conversation); }
/// <summary> /// Selects the conversation using the list of contact if it was not instanciated yet. /// Modification of the selected conversation must use this fonction /// </summary> /// <param name="contact">The contact to chat with.</param> public void SelectConversation(UserViewModel contact) { if (contact != null) { var conversation = FindByJid(contact.Jid); if (conversation != null) { SelectedConversation = conversation; } else { conversation = new Conversation(contact); AllConversations.Add(conversation); SelectedConversation = conversation; } } }