auto select first callsign

This commit is contained in:
DJ2LS 2024-05-01 11:11:13 +02:00
parent e3c9b0ba91
commit 41c8430c93
2 changed files with 7 additions and 0 deletions

View file

@ -35,6 +35,7 @@ function newChat() {
if (callsign === "") return;
this.newChatCall.value = "";
}
</script>
<template>

View file

@ -33,6 +33,12 @@ export async function processFreedataMessages(data) {
) {
chatStore.callsign_list = createCallsignListFromAPI(data);
chatStore.sorted_chat_list = createSortedMessagesList(data);
// also update the selectedCallsign - if its undefined, then we select the first available callsign
if (typeof chatStore.selectedCallsign == "undefined"){
chatStore.selectedCallsign = Object.keys(chatStore.sorted_chat_list)[0]
}
}
}