Show unread status reload link

This commit is contained in:
Mouse Reeve
2021-03-23 12:52:38 -07:00
parent 28651bd804
commit b8cd1d5bce
7 changed files with 34 additions and 21 deletions

View File

@ -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;
}
}