/// <summary> /// Get profile of user from recent conversation. /// </summary> /// <param name="recentConversation"></param> /// <returns>Profile</returns> public static Profile GetProfile(RecentConversation recentConversation) { if (recentConversation == null) { return(null); } return(new Profile { User = recentConversation.User, LastActive = DateTime.Now, }); }
public static void InsertRecentConversation(Message message) { string error; User correspondent = GetCorrespondent(message, out error); if (error != string.Empty) { ErrorDialog.ShowError(error); return; } DeleteRecentConversation(correspondent, out error); var conversation = new RecentConversation { LastMessage = message, User = correspondent }; current_RecentConversations.Insert(0, conversation); }