mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
partially fixing #526
This commit is contained in:
parent
7b0d909c9a
commit
a1a0486507
1 changed files with 16 additions and 10 deletions
|
@ -452,22 +452,28 @@ 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 = [];
|
||||||
|
try{
|
||||||
|
|
||||||
if (
|
if (
|
||||||
typeof dxcallsign !== "undefined" &&
|
typeof dxcallsign !== "undefined" &&
|
||||||
typeof chat.sorted_chat_list[dxcallsign] !== "undefined"
|
typeof chat.sorted_chat_list[dxcallsign] !== "undefined"
|
||||||
) {
|
) {
|
||||||
for (const key in chat.sorted_chat_list[dxcallsign]) {
|
for (const key in chat.sorted_chat_list[dxcallsign]) {
|
||||||
//console.log(chat.sorted_chat_list[dxcallsign][key])
|
//console.log(chat.sorted_chat_list[dxcallsign][key])
|
||||||
//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) {
|
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]);
|
||||||
new_counter += 1;
|
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) {
|
||||||
|
|
Loading…
Reference in a new issue