From a84bb1d22ed4d59deb50d8ecf72fac1e3a8f3ff4 Mon Sep 17 00:00:00 2001 From: fieryhenry <74794355+fieryhenry@users.noreply.github.com> Date: Fri, 18 Jul 2025 19:02:50 +0000 Subject: [PATCH 1/2] Fix `TRUE` number of notifications `update_ticker_count` used to use STORAGE_KEY_STREAM to get the number of notifications which is a boolean value, now it uses STORAGE_KEY_NOTIF_COUNT which is an integer --- assets/js/notifications.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/notifications.js b/assets/js/notifications.js index 55b7a15c..b8d73a82 100644 --- a/assets/js/notifications.js +++ b/assets/js/notifications.js @@ -77,7 +77,7 @@ function create_notification_stream(subscriptions) { function update_ticker_count() { var notification_ticker = document.getElementById('notification_ticker'); - const notification_count = helpers.storage.get(STORAGE_KEY_STREAM); + const notification_count = helpers.storage.get(STORAGE_KEY_NOTIF_COUNT); if (notification_count > 0) { notification_ticker.innerHTML = '' + notification_count + ' '; From 3335bc8c388677517e5c4b86eb917fd3fdace2f8 Mon Sep 17 00:00:00 2001 From: fieryhenry <74794355+fieryhenry@users.noreply.github.com> Date: Fri, 18 Jul 2025 19:07:41 +0000 Subject: [PATCH 2/2] Get a count of 0 if STORAGE_KEY_NOTIF_COUNT is not present in storage Not sure if this is necessary as I think it should always be present in storage, but just in case it isn't --- assets/js/notifications.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/notifications.js b/assets/js/notifications.js index b8d73a82..16d9866d 100644 --- a/assets/js/notifications.js +++ b/assets/js/notifications.js @@ -77,7 +77,7 @@ function create_notification_stream(subscriptions) { function update_ticker_count() { var notification_ticker = document.getElementById('notification_ticker'); - const notification_count = helpers.storage.get(STORAGE_KEY_NOTIF_COUNT); + const notification_count = helpers.storage.get(STORAGE_KEY_NOTIF_COUNT) || 0; if (notification_count > 0) { notification_ticker.innerHTML = '' + notification_count + ' ';