mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-13 18:55:27 +00:00
Remove counts when notifications are deleted
This commit is contained in:
parent
3fce67a60d
commit
94a41498cf
1 changed files with 2 additions and 2 deletions
|
@ -48,8 +48,8 @@ function polling(el) {
|
||||||
function updateCountElement(el, data) {
|
function updateCountElement(el, data) {
|
||||||
const currentCount = el.innerHTML;
|
const currentCount = el.innerHTML;
|
||||||
const count = data[el.getAttribute('data-poll')];
|
const count = data[el.getAttribute('data-poll')];
|
||||||
if (count && count != currentCount) {
|
if (count != currentCount) {
|
||||||
removeClass(el, 'hidden');
|
addRemoveClass(el, 'hidden', count < 1);
|
||||||
el.innerHTML = count;
|
el.innerHTML = count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue