From 3146f64edca429490952392aaac626b4e45d9335 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 2 May 2026 09:06:01 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(im):=20=E6=9C=AA=E8=AF=BB?= =?UTF-8?q?=E8=AE=A1=E6=95=B0=E6=94=B9=E7=94=A8=20isNormalMessage=EF=BC=8C?= =?UTF-8?q?=E5=AF=B9=E9=BD=90=E5=90=8E=E7=AB=AF=20normal=20=E8=AF=AD?= =?UTF-8?q?=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/im/home/store/conversationStore.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/views/im/home/store/conversationStore.ts b/src/views/im/home/store/conversationStore.ts index 110625a68..1b733e47b 100644 --- a/src/views/im/home/store/conversationStore.ts +++ b/src/views/im/home/store/conversationStore.ts @@ -7,7 +7,8 @@ import { ImMessageType, ImMessageStatus, IM_AT_ALL_USER_ID, - TIME_TIP_GAP_MS + TIME_TIP_GAP_MS, + isNormalMessage } from '../../utils/constants' import { getCurrentUserId, imStorage, removeQuietly, StorageKeys } from '../../utils/storage' import { generateClientMessageId, parseRecallMessageId } from '../../utils/message' @@ -431,16 +432,14 @@ export const useConversationStore = defineStore('imConversationStore', { } } - // 2.3 未读数:非当前会话 + 非自己发送 + 非系统 tip + 非已读 => +1 + // 2.3 未读数:非当前会话 + 非自己发送 + 普通消息 + 非已读 => +1 const isActive = this.activeConversation?.type === conversationInfo.type && this.activeConversation?.targetId === conversationInfo.targetId - const isTipMessage = - messageInfo.type === ImMessageType.TIP_TEXT || messageInfo.type === ImMessageType.TIP_TIME if ( !messageInfo.selfSend && !isActive && - !isTipMessage && + isNormalMessage(messageInfo.type) && messageInfo.status !== ImMessageStatus.READ && messageInfo.status !== ImMessageStatus.RECALL ) {