Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

fix: mutating the inbox count on the sidebar and inbox tab when we click mark all as read (#5191)

guru_sainath3545d9402544
diff --git a/web/core/store/notifications/workspace-notifications.store.ts b/web/core/store/notifications/workspace-notifications.store.ts
index 12791a7dfe..59f0dbc033 100644
--- a/web/core/store/notifications/workspace-notifications.store.ts
+++ b/web/core/store/notifications/workspace-notifications.store.ts
@@ -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(),