wait for unlock before showing toasts

This commit is contained in:
AAGaming
2024-07-28 19:56:53 -04:00
parent bac1ef5f4d
commit 3cb150b9fb
2 changed files with 2 additions and 2 deletions
+1
View File
@@ -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: <TranslationHelper transClass={TranslationClass.PLUGIN_LOADER} transText="decky_title" />,
body: (
+1 -2
View File
@@ -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) {