fix(weChat/ckchat): 修复切换联系人时未重置未读计数的问题
在切换联系人时,确保会话的未读计数被正确重置为0。将重置逻辑统一移至addChatSession方法中处理,避免遗漏。
This commit is contained in:
@@ -24,7 +24,6 @@ export const useWeChatStore = create<WeChatState>()(
|
||||
// 切换联系人时清空当前消息,等待重新加载
|
||||
set({ currentMessages: [] });
|
||||
clearUnreadCount([contract.id]).then(() => {
|
||||
contract.unreadCount = 0;
|
||||
addChatSession(contract);
|
||||
set({ currentContract: contract });
|
||||
updateConfig({
|
||||
|
||||
Reference in New Issue
Block a user