Esempio n. 1
0
        //设置会话列表
        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);
                    }
                }
            }
        }
Esempio n. 2
0
 public void clearConversationList()
 {
     ConListBinding.Clear(); //不清除会话内数据
 }