From 9867d7bea0fca194e3cc44c4c446fa4b06a45650 Mon Sep 17 00:00:00 2001
From: AAGaming <aa@mail.catvibers.me>
Date: Sun, 18 Sep 2022 10:17:39 -0400
Subject: Possibly actually fix the toasts issue

---
 frontend/src/toaster.tsx | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

(limited to 'frontend/src/toaster.tsx')

diff --git a/frontend/src/toaster.tsx b/frontend/src/toaster.tsx
index 5590e43c..5cec0943 100644
--- a/frontend/src/toaster.tsx
+++ b/frontend/src/toaster.tsx
@@ -26,13 +26,6 @@ class Toaster extends Logger {
   }
 
   async init() {
-    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];
-      }
-    });
-
     let instance: any;
     while (true) {
       instance = findInReactTree(
@@ -72,6 +65,12 @@ class Toaster extends Logger {
       return ret;
     };
     this.node.stateNode.forceUpdate();
+    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];
+      }
+    });
     this.log('Initialized');
     this.ready = true;
   }
-- 
cgit v1.2.3

