Browse Source

修复被@后一直点不掉的bug

xie.bx 2 years ago
parent
commit
78af8b199e
2 changed files with 4 additions and 3 deletions
  1. 2 1
      im-ui/src/store/chatStore.js
  2. 2 2
      im-uniapp/store/chatStore.js

+ 2 - 1
im-ui/src/store/chatStore.js

@@ -151,7 +151,8 @@ export default {
 				chat.unreadCount++;
 			}
 			// 是否有人@我
-			if(!msgInfo.selfSend && chat.type=="GROUP" && msgInfo.atUserIds){
+			if(!msgInfo.selfSend && chat.type=="GROUP" && msgInfo.atUserIds
+				&& msgInfo.status != MESSAGE_STATUS.READED){
 				let userId = userStore.state.userInfo.id;
 				if(msgInfo.atUserIds.indexOf(userId)>=0){
 					chat.atMe = true;

+ 2 - 2
im-uniapp/store/chatStore.js

@@ -143,13 +143,13 @@ export default {
 				chat.lastSendTime = msgInfo.sendTime;
 				chat.sendNickName = msgInfo.sendNickName;
 			}
-			
 			// 未读加1
 			if (!msgInfo.selfSend && msgInfo.status != MESSAGE_STATUS.READED) {
 				chat.unreadCount++;
 			}
 			// 是否有人@我
-			if(!msgInfo.selfSend && chat.type=="GROUP" && msgInfo.atUserIds){
+			if(!msgInfo.selfSend && chat.type=="GROUP" && msgInfo.atUserIds
+				&& msgInfo.status != MESSAGE_STATUS.READED){
 				let userId = userStore.state.userInfo.id;
 				if(msgInfo.atUserIds.indexOf(userId)>=0){
 					chat.atMe = true;