public void ReloadConversationsAction() { currentUserId = yamsterCache.CurrentUserId; var privateGroup = yamsterCache.GetGroupById(YamsterGroup.ConversationsGroupId); conversationsByUserSet.Clear(); foreach (var thread in privateGroup.Threads) { var participants = thread.ConversationParticipants; if (!chkShowMultiParticipant.Active) { if (participants.Count > 2) { continue; } } YamsterConversation conversation; if (!conversationsByUserSet.TryGetValue(participants, out conversation)) { conversation = new YamsterConversation(participants); conversationsByUserSet.Add(conversation.UserSet, conversation); } conversation.AddThread(thread); } ctlGrid.ReplaceAllItems( conversationsByUserSet.Values.OrderByDescending(x => x.LastUpdate) ); }
public bool Equals(YamsterConversation other) { if (other == null) { return(false); } return(this.UserSet.Equals(other.UserSet)); }
void ctlGrid_FocusedItemChanged(object sender, EventArgs e) { if (ThreadViewer != null) { YamsterConversation conversation = ctlGrid.FocusedItem as YamsterConversation; if (conversation != null && conversation.Threads.Count > 0) { ThreadViewer.LoadMessageList(conversation.GetMessages()); } } }