From 94a41498cfae8d4f342bfbfa6cd0a33fa40afbd7 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 19 Jan 2021 14:32:08 -0800 Subject: [PATCH] Remove counts when notifications are deleted --- bookwyrm/static/js/shared.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bookwyrm/static/js/shared.js b/bookwyrm/static/js/shared.js index fa3f6eb4..3a56431e 100644 --- a/bookwyrm/static/js/shared.js +++ b/bookwyrm/static/js/shared.js @@ -48,8 +48,8 @@ function polling(el) { function updateCountElement(el, data) { const currentCount = el.innerHTML; const count = data[el.getAttribute('data-poll')]; - if (count && count != currentCount) { - removeClass(el, 'hidden'); + if (count != currentCount) { + addRemoveClass(el, 'hidden', count < 1); el.innerHTML = count; } }