From 444152f75bd23749067eebccc8c4f0f8b8cb5bed Mon Sep 17 00:00:00 2001 From: Artem Savchenko Date: Wed, 2 Sep 2026 00:13:04 +0700 Subject: [PATCH] Fix cross-workspace notifications Signed-off-by: Artem Savchenko --- plugins/notification-resources/src/utils.ts | 10 +++++++--- plugins/notification/src/index.ts | 1 + .../src/components/Workbench.svelte | 12 ++++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/plugins/notification-resources/src/utils.ts b/plugins/notification-resources/src/utils.ts index 7584d227b2..5f835b0762 100644 --- a/plugins/notification-resources/src/utils.ts +++ b/plugins/notification-resources/src/utils.ts @@ -453,9 +453,13 @@ export function getDisplayInboxData ( export function getInboxNotificationStore (): Readable { const inboxClient = InboxNotificationsClientImpl.getClient() - return derived(inboxClient.inboxNotificationsByContext, (notificationsByContext) => ({ - notify: getDisplayInboxData(notificationsByContext, 'unread').size > 0 - })) + return derived( + [inboxClient.inboxNotificationsByContext, inboxClient.isLoaded], + ([notificationsByContext, isLoaded]) => ({ + notify: getDisplayInboxData(notificationsByContext, 'unread').size > 0, + isLoaded + }) + ) } export async function getNotificationsCount ( diff --git a/plugins/notification/src/index.ts b/plugins/notification/src/index.ts index 813323fc54..761be23d9a 100644 --- a/plugins/notification/src/index.ts +++ b/plugins/notification/src/index.ts @@ -55,6 +55,7 @@ export const DOMAIN_USER_NOTIFY = 'notification-user' as Domain export interface InboxNotificationState { notify: boolean count?: number + isLoaded?: boolean } /** diff --git a/plugins/workbench-resources/src/components/Workbench.svelte b/plugins/workbench-resources/src/components/Workbench.svelte index 862697d6cc..af42f03983 100644 --- a/plugins/workbench-resources/src/components/Workbench.svelte +++ b/plugins/workbench-resources/src/components/Workbench.svelte @@ -1,5 +1,6 @@