fix: mutating the inbox count on the sidebar and inbox tab when we click mark all as read (#5191)
This commit is contained in:
parent
17e46c812a
commit
3545d94025
1 changed files with 7 additions and 0 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue