fix(weChat/ckchat): 修复切换联系人时未重置未读计数的问题

在切换联系人时,确保会话的未读计数被正确重置为0。将重置逻辑统一移至addChatSession方法中处理,避免遗漏。
This commit is contained in:
2025-09-03 18:20:24 +08:00
parent 30cafc5619
commit 7bd7bd3564
2 changed files with 1 additions and 2 deletions

View File

@@ -24,7 +24,6 @@ export const useWeChatStore = create<WeChatState>()(
// 切换联系人时清空当前消息,等待重新加载
set({ currentMessages: [] });
clearUnreadCount([contract.id]).then(() => {
contract.unreadCount = 0;
addChatSession(contract);
set({ currentContract: contract });
updateConfig({