Only make notification count red for mentions

This commit is contained in:
Mouse Reeve
2021-04-30 07:49:34 -07:00
parent b4c155f134
commit 454dd25681
4 changed files with 22 additions and 3 deletions

View File

@ -97,10 +97,12 @@ let BookWyrm = new class {
updateCountElement(counter, data) {
const currentCount = counter.innerText;
const count = data.count;
const hasMentions = data.has_mentions;
if (count != currentCount) {
this.addRemoveClass(counter.closest('[data-poll-wrapper]'), 'is-hidden', count < 1);
counter.innerText = count;
this.addRemoveClass(counter.closest('[data-poll-wrapper]'), 'is-danger', hasMentions);
}
}