public void Visit(DayMessageView view) { HistoryMessages.BeginChange(); HistoryMessages.Document.Blocks.Clear(); var entityThread = CreateThread(HistoryMessages.Document); view.Messages.Each(message => { var command = new RenderXmppMessage(entityThread.Model, message); command.Execute(); }); HistoryMessages.EndChange(); }
private void LoadHistoryExecuted() { var client = ModelContext.GetClientByContact(_interlocutor); var bare = XmppIdConverter.Jid(_interlocutor).Bare; var history = HistoryService.Read(client.Id, bare); ModifyTextBox(() => { foreach (var message in history) { var command = new RenderXmppMessage(_conversationThread.Model, message); command.Execute(); } }); }
public void Consume(IMessage message) { if (!_frame.IsActive || _frame.CurrentChat != this) { _pendingMessages.Add(message); } else if (_frame.CurrentChat == this) { var counter = GetCounter(); counter.MarkAsRead(message); } ModifyTextBox(() => { var command = new RenderXmppMessage(_conversationThread.Model, message); command.Execute(); }); }
protected void ParseCurrentHistory() { ModifyTextBox(() => { foreach (var msg in MessageFeed.GetMessages(Predicate)) { var counter = GetCounter(); counter.MarkAsRead(msg); var command = new RenderXmppMessage(_conversationThread.Model, msg); command.Execute(); } }); }
public void Consume(IMessage message) { ModifyTextBox(() => { var command = new RenderXmppMessage(_conversationThread.Model, message); command.Execute(); }); }