From eb5b2a06dea77f0ae547ca9a7dc2edea1335ead4 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Fri, 24 May 2024 17:02:30 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E6=96=B0=E6=B6=88=E6=81=AF:=20?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BC=9A=E8=AF=9D=E5=88=97=E8=A1=A8:=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=A4=E6=96=AD;=20console?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/ConversationStore.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/stores/ConversationStore.js b/src/stores/ConversationStore.js index 724ffe1..f4472c1 100644 --- a/src/stores/ConversationStore.js +++ b/src/stores/ConversationStore.js @@ -334,6 +334,7 @@ const messageSlice = (set, get) => ({ conversationsList.unshift(newConversation); console.log('find in list, i:', targetIndex); console.log('find in list, chat updated and Top: \n', JSON.stringify(newConversation, null, 2)); + console.log('list updated : \n', JSON.stringify(conversationsList, null, 2)); const isCurrent = Number(targetId) === Number(currentConversation.sn); const updatedCurrent = isCurrent ? { @@ -342,9 +343,6 @@ const messageSlice = (set, get) => ({ conversation_expiretime: dayjs(message.date).add(24, 'hours').format(DATETIME_FORMAT), } : {...currentConversation}; - // const currentI = conversationsList.findIndex((ele) => String(ele.sn) === String(currentConversation.sn)); - console.log('message in chat', JSON.stringify(message, null, 2), 'currentConversation', JSON.stringify(currentConversation, null, 2)); - console.log('is current and update', isCurrent, JSON.stringify(updatedCurrent, null, 2)); return set({ currentConversation: updatedCurrent, conversationsList: [...conversationsList],