|
|
|
@ -206,6 +206,7 @@ const conversationSlice = (set, get) => ({
|
|
|
|
|
const { conversationsList } = get();
|
|
|
|
|
const targetId = conversation.sn;
|
|
|
|
|
const targetIndex = conversationsList.findIndex((ele) => String(ele.sn) === String(targetId));
|
|
|
|
|
const targetItemFromList = conversationsList.find((ele) => String(ele.sn) === String(targetId));
|
|
|
|
|
targetIndex !== -1
|
|
|
|
|
? conversationsList.splice(targetIndex, 1, {
|
|
|
|
|
...conversationsList[targetIndex],
|
|
|
|
@ -215,7 +216,7 @@ const conversationSlice = (set, get) => ({
|
|
|
|
|
|
|
|
|
|
return set((state) => ({
|
|
|
|
|
totalNotify: state.totalNotify - (conversation.unread_msg_count || 0),
|
|
|
|
|
currentConversation: conversation,
|
|
|
|
|
currentConversation: Object.assign({}, conversation, targetItemFromList),
|
|
|
|
|
referenceMsg: {},
|
|
|
|
|
conversationsList: [...conversationsList],
|
|
|
|
|
}));
|
|
|
|
|