summaryrefslogtreecommitdiff
path: root/frontend/src/toaster.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/toaster.tsx')
-rw-r--r--frontend/src/toaster.tsx17
1 files changed, 13 insertions, 4 deletions
diff --git a/frontend/src/toaster.tsx b/frontend/src/toaster.tsx
index 7ef4a447..0db8889a 100644
--- a/frontend/src/toaster.tsx
+++ b/frontend/src/toaster.tsx
@@ -1,4 +1,13 @@
-import { Module, Patch, ToastData, afterPatch, findInReactTree, findModuleChild, sleep } from 'decky-frontend-lib';
+import {
+ Module,
+ Patch,
+ ToastData,
+ afterPatch,
+ findInReactTree,
+ findModuleChild,
+ getReactRoot,
+ sleep,
+} from 'decky-frontend-lib';
import { ReactNode } from 'react';
import Toast from './components/Toast';
@@ -38,10 +47,10 @@ class Toaster extends Logger {
// </DeckyToasterStateContextProvider>
// ));
let instance: any;
- const tree = (document.getElementById('root') as any)._reactRootContainer._internalRoot.current;
+ const tree = getReactRoot(document.getElementById('root') as any);
const findToasterRoot = (currentNode: any, iters: number): any => {
- if (iters >= 65) {
- // currently 65
+ if (iters >= 80) {
+ // currently 66
return null;
}
if (