mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-13 12:15:09 +03:00
wait for unlock before showing toasts
This commit is contained in:
@@ -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: (
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user