From 65a9095b0d53ed71d52072326a91a482ae365382 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Mon, 4 Mar 2024 10:30:40 +0800 Subject: [PATCH] =?UTF-8?q?todo:=20=E6=B6=88=E6=81=AF=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/ConversationStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores/ConversationStore.js b/src/stores/ConversationStore.js index 86e6e01..0d7f74e 100644 --- a/src/stores/ConversationStore.js +++ b/src/stores/ConversationStore.js @@ -160,7 +160,7 @@ const conversationSlice = (set, get) => ({ return set((state) => ({ conversationsList: [...newConversations, ...state.conversationsList], activeConversations: { ...activeConversations, ...newConversationsMapped }, - totalNotify: state.totalNotify + newConversations.map(ele => ele.unread_msg_count).reduce((acc, cur) => acc + cur, 0), + totalNotify: state.totalNotify + newConversations.map(ele => ele.unread_msg_count).reduce((acc, cur) => acc + (cur || 0), 0), })); }, delConversationitem: (conversation) => {