1.被选中的session的未读应该是0

2.发送消息后,应该清空草稿
This commit is contained in:
bob
2024-09-19 09:37:56 +08:00
parent a40945bddd
commit 0b935ce1ab

View File

@@ -149,7 +149,8 @@ const handleExportContent = (content) => {
readTime: now,
lastMsgId: deliveredMsg.body.msgId,
lastMsgContent: content,
lastMsgTime: now
lastMsgTime: now,
draft: ''
})
// 如果当前sessionid和这个“已发送”消息的sessionId更新到msgRecords中
@@ -189,7 +190,7 @@ watch(choosedSessionId, (newValue) => {
if (res.data.data.lastMsgId > choosedSession.value.readMsgId) {
const now = new Date()
//TODO 看看这三行能不能省
//这三行能不能省下面的只是改了Store的值本地的choosedSession没有改
choosedSession.value.readMsgId = res.data.data.lastMsgId
choosedSession.value.readTime = now
choosedSession.value.unreadCount = 0;
@@ -198,7 +199,9 @@ watch(choosedSessionId, (newValue) => {
...choosedSession.value,
sessionId: choosedSessionId.value,
readMsgId: res.data.data.lastMsgId,
readTime: now })
readTime: now,
unreadCount: 0
})
}
})
})