From 53fb4c85bbbd8f9b97e99948917f541d74f6b817 Mon Sep 17 00:00:00 2001 From: Mattk70 Date: Fri, 9 Feb 2024 14:49:45 +0000 Subject: [PATCH] Fixed Birdnet migrants list --- js/listWorker.js | 2 +- js/ui.js | 5580 +++++++++++++++++---------------- nocturnal_activity_index.json | 1006 +++--- 3 files changed, 3303 insertions(+), 3285 deletions(-) diff --git a/js/listWorker.js b/js/listWorker.js index 2a0f71ed..c89f56bc 100644 --- a/js/listWorker.js +++ b/js/listWorker.js @@ -213,7 +213,7 @@ class Model { // BirdNET nocturnal bird filter for (let i = 0; i < this.labels.length; i++) { const item = this.labels[i]; - if (ACTIVITY_INDEX[item] !== 1 && BIRDNET_NOT_BIRDS.indexOf(item) !== -1) includedIDs.push(i); + if (ACTIVITY_INDEX[item] !== 1 && BIRDNET_NOT_BIRDS.indexOf(item) < 0) includedIDs.push(i); } } } else { diff --git a/js/ui.js b/js/ui.js index aebea80a..3577ef3c 100644 --- a/js/ui.js +++ b/js/ui.js @@ -39,27 +39,27 @@ const os = window.module.os; let worker; const establishMessageChannel = - new Promise((resolve) => { - window.onmessage = (event) => { - // event.source === window means the message is coming from the preload - // script, as opposed to from an