Remove counts when notifications are deleted
This commit is contained in:
parent
3fce67a60d
commit
94a41498cf
@ -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…
x
Reference in New Issue
Block a user