From 3cb150b9fbe37d8df001c456d7bef957f5cd92f7 Mon Sep 17 00:00:00 2001 From: AAGaming Date: Sun, 28 Jul 2024 19:56:53 -0400 Subject: wait for unlock before showing toasts --- frontend/src/plugin-loader.tsx | 1 + frontend/src/router-hook.tsx | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/plugin-loader.tsx b/frontend/src/plugin-loader.tsx index 09fb4433..74732ac7 100644 --- a/frontend/src/plugin-loader.tsx +++ b/frontend/src/plugin-loader.tsx @@ -211,6 +211,7 @@ class PluginLoader extends Logger { this.deckyState.setHasLoaderUpdate(true); if (this.notificationService.shouldNotify('deckyUpdates')) { this.loaderUpdateToast && this.loaderUpdateToast.dismiss(); + await this.routerHook.waitForUnlock(); this.loaderUpdateToast = this.toaster.toast({ title: , body: ( diff --git a/frontend/src/router-hook.tsx b/frontend/src/router-hook.tsx index 6e7f5ee1..98aa6863 100644 --- a/frontend/src/router-hook.tsx +++ b/frontend/src/router-hook.tsx @@ -173,10 +173,9 @@ class RouterHook extends Logger { } } - private async waitForUnlock() { + public async waitForUnlock() { try { while (window?.securitystore?.IsLockScreenActive?.()) { - this.debug('Waiting 500ms for lockscreen to close'); await sleep(500); } } catch (e) { -- cgit v1.2.3