public void LoadMessageList(IEnumerable <YamsterMessage> messagesToLoad) { this.threadToLoad = null; this.messagesToLoad = messagesToLoad.OrderBy(x => x.MessageId).ToList(); this.messageToHighlight = null; rebuildViewLagger.RequestAction(); UpdateUI(); }
public void AddThread(YamsterThread thread) { Threads.Add(thread); var latestMessageInThread = thread.Messages.Last(); if (this.LatestMessage == null || latestMessageInThread.MessageId > this.LatestMessage.MessageId) { this.LatestMessage = latestMessageInThread; } }
public void ReplyToThread(YamsterThread threadBeingRepliedTo) { if (threadBeingRepliedTo == null) { throw new ArgumentNullException("threadBeingRepliedTo"); } this.ComposerMode = MessageComposerMode.ReplyToThread; this.GroupContext = threadBeingRepliedTo.Group; this.ThreadContext = threadBeingRepliedTo; this.MessageBeingRepliedTo = null; UpdateUI(); }
public void LoadThread(YamsterThread thread, YamsterMessage messageToHighlight = null) { if (messageToHighlight != null && messageToHighlight.Thread != thread) { throw new ArgumentException("messageToHighlight must belong to the specified thread"); } this.threadToLoad = thread; this.messagesToLoad = threadToLoad.Messages; this.messageToHighlight = messageToHighlight; rebuildViewLagger.RequestAction(); UpdateUI(); }
public void AddThreadAtEnd(YamsterThread thread) { ctlGrid.AddItem(thread); ctlGrid.QueueDraw(); }