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,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 (
|
||||
|
||||
Reference in New Issue
Block a user