default message when no notifications

This commit is contained in:
amazuecos
2024-12-04 18:26:37 +01:00
parent 8f907b2762
commit 16cec58431
3 changed files with 6 additions and 2 deletions

View File

@ -722,9 +722,11 @@ export const showNotificationMessages = (dom) => {
dom.empty()
$("#chat-notification-number")
if (data.totalMessages > 0) {
$("#chat-message-notification-title").addClass("d-none")
$("#chat-notification-number").removeClass("d-none")
$("#chat-notification-number").text(data.totalMessages ?? 0)
} else {
$("#chat-message-notification-title").removeClass("d-none")
$("#chat-notification-number").addClass("d-none")
$("#chat-notification-number").text(0)
}