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 @@