void AddChatState(MessageModel msg) { DeleteOldChatState(); var buffer = OutputMessageTextView.Buffer; buffer.AddMark(ChatStateStartPosition, buffer.EndIter); OutputMessageTextView.AddMessage(msg, false, false); ChatStatePositionValid = true; }
void UpdateChatState() { DeleteOldChatState(); if (LastPresenceMessage == null && TypingDots == null) { // nothing to display return; } var buffer = OutputMessageTextView.Buffer; buffer.AddMark(ChatStateStartPosition, buffer.EndIter); if (TypingDots != null) { OutputMessageTextView.AddMessage(TypingDots, true, false); } if (LastPresenceMessage != null) { OutputMessageTextView.AddMessage(LastPresenceMessage, false); } ChatStatePositionValid = true; }