diff --git a/gui_vue/src/components/chat.vue b/gui_vue/src/components/chat.vue index c9beef5b..e43dcefe 100644 --- a/gui_vue/src/components/chat.vue +++ b/gui_vue/src/components/chat.vue @@ -31,7 +31,7 @@ updateAllChat();
-
+
diff --git a/gui_vue/src/components/chat_conversations.vue b/gui_vue/src/components/chat_conversations.vue index 603e8ab6..61021b3a 100644 --- a/gui_vue/src/components/chat_conversations.vue +++ b/gui_vue/src/components/chat_conversations.vue @@ -14,6 +14,8 @@ const state = useStateStore(pinia); import { useChatStore } from "../store/chatStore.js"; const chat = useChatStore(pinia); +import {getNewMessagesByDXCallsign, resetIsNewMessage} from '../js/chatHandler' + import chat_conversations_entry from "./chat_conversations_entry.vue"; @@ -21,6 +23,7 @@ import chat_conversations_entry from "./chat_conversations_entry.vue"; function chatSelected(callsign) { chat.selectedCallsign = callsign.toUpperCase(); + // scroll message container to bottom var messageBody = document.getElementById("message-container"); if (messageBody != null ) { @@ -28,6 +31,13 @@ function chatSelected(callsign) { messageBody.scrollTop = messageBody.scrollHeight - messageBody.clientHeight; } + if (getNewMessagesByDXCallsign(callsign)[1] > 0){ + let messageArray = getNewMessagesByDXCallsign(callsign)[2] + for (const key in messageArray){ + resetIsNewMessage(messageArray[key].uuid, false) + } + } + try { chat.beaconLabelArray = Object.values( chat.sorted_beacon_list[chat.selectedCallsign].timestamp, @@ -47,7 +57,7 @@ function chatSelected(callsign) {