From 5fa4eaf909b4ef5343d8b1a2284a725cbb6798d2 Mon Sep 17 00:00:00 2001 From: Hemna Date: Thu, 11 Apr 2024 18:11:05 -0400 Subject: [PATCH] Fixed a problem with the webchat tab notification Somehow the hidden div for the webchat interface's tab notification was removed. this patch adds it back in so the user knows that they have message(s) for a tab that isn't selected --- aprsd/web/chat/static/js/send-message.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aprsd/web/chat/static/js/send-message.js b/aprsd/web/chat/static/js/send-message.js index 1e0fa58..8be5d5d 100644 --- a/aprsd/web/chat/static/js/send-message.js +++ b/aprsd/web/chat/static/js/send-message.js @@ -313,6 +313,7 @@ function create_callsign_tab(callsign, active=false) { //item_html += '' @@ -407,6 +408,9 @@ function append_message(callsign, msg, msg_html) { tab_notify_id = tab_notification_id(callsign, true); // get the current count of notifications count = parseInt($(tab_notify_id).text()); + if (isNaN(count)) { + count = 0; + } count += 1; $(tab_notify_id).text(count); $(tab_notify_id).removeClass('visually-hidden');