예제 #1
0
 private void MessageReceived(ChatConversation chatConversation, string ProcessType)
 {
     try
     {
         if (ProcessType == "OldChat")
         {
             _adapter.update(chatConversation);
             _adapter.NotifyDataSetChanged();
         }
         else
         {
             _adapter.add(chatConversation);
             _adapter.NotifyDataSetChanged();
         }
     }
     catch (Exception ex)
     {
         Crashes.TrackError(ex);
     }
 }
예제 #2
0
 private void LoadLocalChats()
 {
     try
     {
         Chats = ChatConversationRepository.GetAllChat();
         if (Chats.Count > 0)
         {
             _adapter = new ChatListAdapter(this.Context, Chats);
             _adapter.PrivateChatItemClick += _adapter_ItemClick;
             _adapter.GroupChatItemClick   += _adapter_GroupChatItemClick;
             mRecyclerView.SetAdapter(_adapter);
             _adapter.NotifyDataSetChanged();
         }
     }
     catch (Exception ex)
     { Crashes.TrackError(ex); }
 }