public void ChangeChannel(string channel)
 {
     this.CurrentChannel = channel;
     Application.SynchronizationContext.Post(_ =>
     {
         messageAdapter.Clear();
         if (FullHistory.ContainsKey(channel))
         {
             FullHistory[channel].ForEach(msg =>
             {
                 messageAdapter.Add(msg);
             });
         }
     }, null);
 }
 public void AppendMessage(ChatMessage chatMessage)
 {
     if (!FullHistory.ContainsKey(chatMessage.Channel))
     {
         FullHistory.Add(chatMessage.Channel, new List <ChatMessage>());
     }
     FullHistory[chatMessage.Channel].Add(chatMessage);
     if (chatMessage.Channel == this.CurrentChannel)
     {
         Application.SynchronizationContext.Post(_ =>
         {
             messageAdapter.Add(chatMessage);
             messageAdapter.NotifyDataSetChanged();
         }, null);
     }
 }