mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-17 00:37:49 +00:00
fix: Adjust tabs and toaster hooks to work on react 18, also half-fix Valve Internal
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// TabsHook for versions before the Desktop merge
|
||||
import { Patch, afterPatch, sleep } from 'decky-frontend-lib';
|
||||
import { Patch, afterPatch, getReactRoot, sleep } from 'decky-frontend-lib';
|
||||
import { memo } from 'react';
|
||||
|
||||
import NewTabsHook from './tabs-hook';
|
||||
@@ -35,7 +35,7 @@ class TabsHook extends NewTabsHook {
|
||||
|
||||
init() {
|
||||
const self = this;
|
||||
const tree = (document.getElementById('root') as any)._reactRootContainer._internalRoot.current;
|
||||
const tree = getReactRoot(document.getElementById('root') as any);
|
||||
let scrollRoot: any;
|
||||
async function findScrollRoot(currentNode: any, iters: number): Promise<any> {
|
||||
if (iters >= 30) {
|
||||
|
||||
Reference in New Issue
Block a user