diff --git a/templates/chat.html b/templates/chat.html index 2fc994f..65b94d6 100644 --- a/templates/chat.html +++ b/templates/chat.html @@ -702,6 +702,7 @@ function filterRooms() { renderRooms(); } async function selectRoom(roomId) { currentRoomId = roomId; oldestMsgId = null; + markRead(roomId); // 立即标记已读,使聊天气泡消失 document.getElementById('emptyState').classList.add('hidden'); // 隐藏通知详情 const nd = document.getElementById('notifDetailView'); @@ -729,7 +730,6 @@ async function selectRoom(roomId) { } renderRooms(); await loadMessages(roomId); - markRead(roomId); } function updateChatHeaderExamStatus(room) {