mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
auto select first callsign
This commit is contained in:
parent
e3c9b0ba91
commit
41c8430c93
2 changed files with 7 additions and 0 deletions
|
@ -35,6 +35,7 @@ function newChat() {
|
||||||
if (callsign === "") return;
|
if (callsign === "") return;
|
||||||
this.newChatCall.value = "";
|
this.newChatCall.value = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -33,6 +33,12 @@ export async function processFreedataMessages(data) {
|
||||||
) {
|
) {
|
||||||
chatStore.callsign_list = createCallsignListFromAPI(data);
|
chatStore.callsign_list = createCallsignListFromAPI(data);
|
||||||
chatStore.sorted_chat_list = createSortedMessagesList(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]
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue