Skip to content

Commit

Permalink
Don't count supporterExpired notifications in our count
Browse files Browse the repository at this point in the history
We handle these messages differently than normal notifications, so don't
create a count for them.

Fixes online-go#2687
  • Loading branch information
anoek committed May 18, 2024
1 parent 2f0881e commit 71a96c9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/Notifications/NotificationManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,12 @@ export class NotificationManager {

this.unread_notification_count = 0;
for (const k in this.notifications) {
this.unread_notification_count += !this.notifications[k].read ? 1 : 0;
let should_count = !this.notifications[k].read;
if (this.notifications[k].type === "supporterExpired") {
should_count = false;
}

this.unread_notification_count += should_count ? 1 : 0;
this.ordered_notifications.push(this.notifications[k]);
}

Expand Down

0 comments on commit 71a96c9

Please sign in to comment.