Пример #1
0
void CDoodSessionListManager::onChatListChanged(const Chat_UIList &chats)
{
    qDebug() << Q_FUNC_INFO << "zhangp **** chat size4 = " << chats.size();
    Chat_UI historysession;
    foreach (historysession, chats) {
        if(!sessionListMap.contains(historysession.id)) {
            CDoodSessionListItem *tmpItem = new CDoodSessionListItem(this);
            tmpItem->setId(historysession.id);
            tmpItem->setLastMsg(historysession.last_msg);
            tmpItem->setName(historysession.name);
            tmpItem->setMsgTime(historysession.msg_time);
            tmpItem->setThumbAvatar(historysession.thumb_avatar);
            qDebug() << Q_FUNC_INFO << "chat avatar111:" << historysession.thumb_avatar;
            addItem(tmpItem);
            sessionListMap[historysession.id] = tmpItem;
        }
    }
}
Пример #2
0
void LinkDoodService::onChatListChanged(Chat_UIList chats)
{
    qDebug() << Q_FUNC_INFO << "11111111111111111111111chats size3:" << chats.size();
    emit chatListChanged(chats);
}