新增聊天记录搜索功能:在聊天窗口中引入ChatRecordSearch组件,优化消息输入区域,更新状态管理以支持聊天记录模型的显示与隐藏,提升用户体验和代码可读性。
This commit is contained in:
@@ -10,6 +10,8 @@ import {
|
||||
* 包含聊天消息、联系人管理、朋友圈等功能的状态和方法
|
||||
*/
|
||||
export interface WeChatState {
|
||||
showChatRecordModel: boolean;
|
||||
updateShowChatRecordModel: (show: boolean) => void;
|
||||
aiQuoteMessageContent: number;
|
||||
updateAiQuoteMessageContent: (message: number) => void;
|
||||
quoteMessageContent: string;
|
||||
|
||||
@@ -33,6 +33,10 @@ import {
|
||||
export const useWeChatStore = create<WeChatState>()(
|
||||
persist(
|
||||
(set, get) => ({
|
||||
showChatRecordModel: false,
|
||||
updateShowChatRecordModel: (show: boolean) => {
|
||||
set({ showChatRecordModel: show });
|
||||
},
|
||||
//当前用户的ai接管状态
|
||||
aiQuoteMessageContent: 0,
|
||||
updateAiQuoteMessageContent: (message: number) => {
|
||||
@@ -159,7 +163,8 @@ export const useWeChatStore = create<WeChatState>()(
|
||||
} else {
|
||||
params.wechatChatroomId = contract.id;
|
||||
}
|
||||
|
||||
//重置动作
|
||||
set({ showChatRecordModel: false });
|
||||
clearUnreadCount1(params);
|
||||
clearUnreadCount2([contract.id]);
|
||||
getFriendInjectConfig({
|
||||
|
||||
Reference in New Issue
Block a user