mirror of
https://gitee.com/Zhaoxin59/my-chat_-client.git
synced 2026-02-14 00:51:48 +08:00
add recent session message
This commit is contained in:
@ -49,7 +49,7 @@ namespace model
|
||||
QList<ChatSessionInfo>* chatSessionList = nullptr;
|
||||
|
||||
//记录当前选中的会话是哪个
|
||||
QString currentChatSession = "";
|
||||
QString currentChatSessionId = "";
|
||||
|
||||
//记录每个会话中,都有哪些成员
|
||||
QHash<QString, QList<UserInfo>>* memberList = nullptr;//unordered_map
|
||||
@ -107,9 +107,33 @@ namespace model
|
||||
void getFriendListAsync();
|
||||
void resetFriendList(std::shared_ptr<bite_im::GetFriendListRsp> resp);
|
||||
|
||||
//获取会话列表
|
||||
QList<ChatSessionInfo>* getChatSessionList();
|
||||
void getChatSessionListAsync();
|
||||
void resetChatSessionList(std::shared_ptr<bite_im::GetChatSessionListRsp> resp);
|
||||
|
||||
//获取好友申请列表
|
||||
QList<UserInfo>* getApplyList();
|
||||
void getApplyListAsync();
|
||||
void resetApplyList(std::shared_ptr<bite_im::GetPendingFriendEventListRsp> resp);
|
||||
|
||||
//获取最近的消息列表
|
||||
void getRecnetMessageListAsync(const QString& chatSessionId);
|
||||
QList<Message>* getRecentMessageList(const QString& chatSessionId);
|
||||
void resetRecentMessageList(const QString& chatSessionId, std::shared_ptr<bite_im::GetRecentMsgRsp> resp);
|
||||
|
||||
//根据会话id查询会话信息
|
||||
ChatSessionInfo* findChatSessionById(const QString& chatSessionId);
|
||||
|
||||
//设置/获取当前选中的会话
|
||||
void setCurrentChatSessionId(const QString& chatSessionId);
|
||||
const QString& getCurrentSessionId();
|
||||
signals:
|
||||
//自定义信号
|
||||
void getMyselfDone();
|
||||
void getFriendListDone();
|
||||
void getChatSessionListDone();
|
||||
void getApplyListDone();
|
||||
void getRecentMessageListDone(const QString& chatSessionId);
|
||||
};
|
||||
} //end namespace model
|
||||
|
||||
Reference in New Issue
Block a user