Skip to content

Commit

Permalink
fix: mutating the inbox count on the sidebar and inbox tab when we cl…
Browse files Browse the repository at this point in the history
…ick mark all as read (#5191)
  • Loading branch information
gurusainath authored Jul 22, 2024
1 parent 17e46c8 commit 3545d94
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions web/core/store/notifications/workspace-notifications.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,13 @@ export class WorkspaceNotificationStore implements IWorkspaceNotificationStore {
};
await workspaceNotificationService.markAllNotificationsAsRead(workspaceSlug, params);
runInAction(() => {
update(
this.unreadNotificationsCount,
this.currentNotificationTab === ENotificationTab.ALL
? "total_unread_notifications_count"
: "mention_unread_notifications_count",
() => 0
);
Object.values(this.notifications).forEach((notification) =>
notification.mutateNotification({
read_at: new Date().toUTCString(),
Expand Down

0 comments on commit 3545d94

Please sign in to comment.