diff options
| author | AAGaming <aa@mail.catvibers.me> | 2022-09-16 18:49:35 -0400 |
|---|---|---|
| committer | AAGaming <aa@mail.catvibers.me> | 2022-09-16 18:49:35 -0400 |
| commit | 463258febbb67bf866b107bed2417a100f6eade3 (patch) | |
| tree | c89aa0354b608d46d34705fef0b835204c918f50 /frontend/src/toaster.tsx | |
| parent | 304fc0f94c7e558e11ff17787ce8b5944de15474 (diff) | |
| download | decky-loader-463258febbb67bf866b107bed2417a100f6eade3.tar.gz decky-loader-463258febbb67bf866b107bed2417a100f6eade3.zip | |
wait for toaster ready, hopefully fix file browser patch
Diffstat (limited to 'frontend/src/toaster.tsx')
| -rw-r--r-- | frontend/src/toaster.tsx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/frontend/src/toaster.tsx b/frontend/src/toaster.tsx index 3a922bfc..5590e43c 100644 --- a/frontend/src/toaster.tsx +++ b/frontend/src/toaster.tsx @@ -15,6 +15,7 @@ class Toaster extends Logger { private instanceRetPatch?: Patch; private node: any; private settingsModule: any; + private ready: boolean = false; constructor() { super('Toaster'); @@ -72,9 +73,13 @@ class Toaster extends Logger { }; this.node.stateNode.forceUpdate(); this.log('Initialized'); + this.ready = true; } - toast(toast: ToastData) { + async toast(toast: ToastData) { + while (!this.ready) { + await sleep(100); + } const settings = this.settingsModule.settings; let toastData = { nNotificationID: window.NotificationStore.m_nNextTestNotificationID++, |
