//设置会话列表 public void setConversationList(ObservableCollection <LocalConversation> conversationList) { ConListBinding.Clear(); if (conversationList == null) { return; } lock (mDataLocker) { foreach (LocalConversation conversation in conversationList) { if (conversation != null && conversation.ConId != null) { if (!mDataMap.ContainsKey(conversation.ConId)) { mDataMap[conversation.ConId] = new ObservableCollection <ChatMsg>(); } ConListBinding.Add(conversation); } } } }
public void clearConversationList() { ConListBinding.Clear(); //不清除会话内数据 }