diff options
| author | AAGaming <aa@mail.catvibers.me> | 2022-09-18 15:03:59 -0400 |
|---|---|---|
| committer | AAGaming <aa@mail.catvibers.me> | 2022-09-18 15:03:59 -0400 |
| commit | 797c7ea3b0c75069c74ffae465e5053d5829b919 (patch) | |
| tree | 56fa7923574c9bb64ed21349b2efe153e97396ab | |
| parent | 0f06bc1ef0d0c7b07e2d740599c745bddaec8264 (diff) | |
| download | decky-loader-797c7ea3b0c75069c74ffae465e5053d5829b919.tar.gz decky-loader-797c7ea3b0c75069c74ffae465e5053d5829b919.zip | |
hopefully actually fix toaster
| -rw-r--r-- | frontend/src/toaster.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/frontend/src/toaster.tsx b/frontend/src/toaster.tsx index 5cec0943..fcf89abb 100644 --- a/frontend/src/toaster.tsx +++ b/frontend/src/toaster.tsx @@ -68,7 +68,7 @@ class Toaster extends Logger { this.settingsModule = findModuleChild((m) => { if (typeof m !== 'object') return undefined; for (let prop in m) { - if (typeof m[prop]?.settings?.bDisableToastsInGame !== 'undefined') return m[prop]; + if (typeof m[prop]?.settings && m[prop]?.communityPreferences) return m[prop]; } }); this.log('Initialized'); @@ -79,7 +79,7 @@ class Toaster extends Logger { while (!this.ready) { await sleep(100); } - const settings = this.settingsModule.settings; + const settings = this.settingsModule?.settings; let toastData = { nNotificationID: window.NotificationStore.m_nNextTestNotificationID++, rtCreated: Date.now(), @@ -91,8 +91,8 @@ class Toaster extends Logger { // @ts-ignore toastData.data.appid = () => 0; if ( - (settings.bDisableAllToasts && !toast.critical) || - (settings.bDisableToastsInGame && !toast.critical && window.NotificationStore.BIsUserInGame()) + (settings?.bDisableAllToasts && !toast.critical) || + (settings?.bDisableToastsInGame && !toast.critical && window.NotificationStore.BIsUserInGame()) ) return; window.NotificationStore.m_rgNotificationToasts.push(toastData); |
