add recent session message

This commit is contained in:
xyz
2025-06-17 18:40:02 +08:00
parent e4ec73b510
commit c50f574eed
9 changed files with 423 additions and 7 deletions

View File

@ -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