Merge branch 'develop' into ls-arq

This commit is contained in:
DJ2LS 2023-11-04 14:32:33 +01:00 committed by GitHub
commit 96e5e875b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -452,22 +452,27 @@ export function getNewMessagesByDXCallsign(dxcallsign): [number, number, any] {
let new_counter = 0; let new_counter = 0;
let total_counter = 0; let total_counter = 0;
let item_array = []; let item_array = [];
if ( try {
typeof dxcallsign !== "undefined" && if (
typeof chat.sorted_chat_list[dxcallsign] !== "undefined" typeof dxcallsign !== "undefined" &&
) { typeof chat.sorted_chat_list[dxcallsign] !== "undefined"
for (const key in chat.sorted_chat_list[dxcallsign]) { ) {
//console.log(chat.sorted_chat_list[dxcallsign][key]) for (const key in chat.sorted_chat_list[dxcallsign]) {
//item_array.push(chat.sorted_chat_list[dxcallsign][key]) //console.log(chat.sorted_chat_list[dxcallsign][key])
if (chat.sorted_chat_list[dxcallsign][key].is_new) { //item_array.push(chat.sorted_chat_list[dxcallsign][key])
item_array.push(chat.sorted_chat_list[dxcallsign][key]); if (chat.sorted_chat_list[dxcallsign][key].is_new) {
new_counter += 1; item_array.push(chat.sorted_chat_list[dxcallsign][key]);
new_counter += 1;
}
total_counter += 1;
} }
total_counter += 1;
} }
}
return [total_counter, new_counter, item_array]; return [total_counter, new_counter, item_array];
} catch (e) {
console.log(e);
return [0, 0, item_array];
}
} }
export function resetIsNewMessage(uuid, value) { export function resetIsNewMessage(uuid, value) {