summaryrefslogtreecommitdiff
path: root/frontend/src/tabs-hook.tsx
diff options
context:
space:
mode:
authorAAGaming <aagaming@riseup.net>2023-12-12 22:21:25 -0500
committerAAGaming <aagaming@riseup.net>2023-12-12 22:21:25 -0500
commit80a00a0d35655791a4e2bc697ad0748fe2c2f9ad (patch)
tree1b78623ff497f9b42f1cda1bcf36ab90462096d4 /frontend/src/tabs-hook.tsx
parent91186da97940a24c80edcd41991727d43da19456 (diff)
downloaddecky-loader-80a00a0d35655791a4e2bc697ad0748fe2c2f9ad.tar.gz
decky-loader-80a00a0d35655791a4e2bc697ad0748fe2c2f9ad.zip
fix: Adjust tabs and toaster hooks to work on react 18, also half-fix Valve Internal
Diffstat (limited to 'frontend/src/tabs-hook.tsx')
-rw-r--r--frontend/src/tabs-hook.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/frontend/src/tabs-hook.tsx b/frontend/src/tabs-hook.tsx
index 72437701..56ff8f10 100644
--- a/frontend/src/tabs-hook.tsx
+++ b/frontend/src/tabs-hook.tsx
@@ -1,5 +1,5 @@
// TabsHook for versions after the Desktop merge
-import { Patch, QuickAccessTab, afterPatch, findInReactTree, sleep } from 'decky-frontend-lib';
+import { Patch, QuickAccessTab, afterPatch, findInReactTree, getReactRoot, sleep } from 'decky-frontend-lib';
import { QuickAccessVisibleStateProvider } from './components/QuickAccessVisibleState';
import Logger from './logger';
@@ -32,11 +32,11 @@ class TabsHook extends Logger {
}
init() {
- const tree = (document.getElementById('root') as any)._reactRootContainer._internalRoot.current;
+ const tree = getReactRoot(document.getElementById('root') as any);
let qAMRoot: any;
const findQAMRoot = (currentNode: any, iters: number): any => {
- if (iters >= 65) {
- // currently 45
+ if (iters >= 80) {
+ // currently 67
return null;
}
if (