Show unread status reload link
This commit is contained in:
parent
28651bd804
commit
b8cd1d5bce
7 changed files with 34 additions and 21 deletions
|
@ -61,9 +61,9 @@ function polling(el, delay) {
|
|||
|
||||
function updateCountElement(el, data) {
|
||||
const currentCount = el.innerText;
|
||||
const count = data[el.getAttribute('data-poll')];
|
||||
const count = data.count;
|
||||
if (count != currentCount) {
|
||||
addRemoveClass(el, 'hidden', count < 1);
|
||||
addRemoveClass(el.closest('[data-poll-wrapper]'), 'hidden', count < 1);
|
||||
el.innerText = count;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue