makes sure that the large notification count badge on the notifications page gets incremented and decremented. Not the neatest solution since this code can be called from many pages, but shouldn't cause any problems in that case.
This commit is contained in:
parent
b6dd14a968
commit
4d6f53401b
1 changed files with 3 additions and 0 deletions
|
|
@ -57,12 +57,15 @@
|
|||
|
||||
if(self.badge.text() !== "") {
|
||||
self.badge.text(self.count);
|
||||
$( ".notification_count" ).text(self.count);
|
||||
|
||||
if(self.count === 0) {
|
||||
self.badge.addClass("hidden");
|
||||
$( ".notification_count" ).addClass("hidden");
|
||||
}
|
||||
else if(self.count === 1) {
|
||||
self.badge.removeClass("hidden");
|
||||
$( ".notification_count" ).removeClass("hidden");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue