From 2fef1c74204f92b73749308d9ef5632a67d9e0c1 Mon Sep 17 00:00:00 2001
From: Alexander Onnikov <alexander.onnikov@xored.com>
Date: Mon, 7 Nov 2022 16:45:06 +0700
Subject: [PATCH] 4001 Reset notification client on workbench start

Signed-off-by: Alexander Onnikov <alexander.onnikov@xored.com>
---
 plugins/notification-resources/src/utils.ts                 | 4 ++++
 plugins/workbench-resources/src/components/Workbench.svelte | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/plugins/notification-resources/src/utils.ts b/plugins/notification-resources/src/utils.ts
index fdec0e2e1f..343fe6f540 100644
--- a/plugins/notification-resources/src/utils.ts
+++ b/plugins/notification-resources/src/utils.ts
@@ -42,6 +42,10 @@ export class NotificationClientImpl implements NotificationClient {
     })
   }
 
+  static createClient (): void {
+    NotificationClientImpl._instance = new NotificationClientImpl()
+  }
+
   static getClient (): NotificationClientImpl {
     if (NotificationClientImpl._instance === undefined) {
       NotificationClientImpl._instance = new NotificationClientImpl()
diff --git a/plugins/workbench-resources/src/components/Workbench.svelte b/plugins/workbench-resources/src/components/Workbench.svelte
index a5cd56e2da..b74bf00782 100644
--- a/plugins/workbench-resources/src/components/Workbench.svelte
+++ b/plugins/workbench-resources/src/components/Workbench.svelte
@@ -59,7 +59,7 @@
   let contentPanel: HTMLElement
 
   setClient(client)
-  NotificationClientImpl.getClient()
+  NotificationClientImpl.createClient()
 
   let currentAppAlias: string | undefined
   let currentSpace: Ref<Space> | undefined