fix(toaster): fixup for latest @decky/ui

This commit is contained in:
AAGaming
2024-07-26 14:29:25 -04:00
parent 7045cdea6b
commit 4b23a800f6
+5 -5
View File
@@ -3,7 +3,7 @@ import {
Export, Export,
Patch, Patch,
afterPatch, afterPatch,
findClass, findClassByName,
findInReactTree, findInReactTree,
findModuleExport, findModuleExport,
getReactRoot, getReactRoot,
@@ -49,10 +49,10 @@ class Toaster extends Logger {
// )); // ));
let instance: any; let instance: any;
const tree = getReactRoot(document.getElementById('root') as any); const tree = getReactRoot(document.getElementById('root') as any);
const toasterClass1 = findClass('GamepadToastPlaceholder'); const toasterClass1 = findClassByName('GamepadToastPlaceholder');
const toasterClass2 = findClass('ToastPlaceholder'); const toasterClass2 = findClassByName('ToastPlaceholder');
const toasterClass3 = findClass('ToastPopup'); const toasterClass3 = findClassByName('ToastPopup');
const toasterClass4 = findClass('GamepadToastPopup'); const toasterClass4 = findClassByName('GamepadToastPopup');
const findToasterRoot = (currentNode: any, iters: number): any => { const findToasterRoot = (currentNode: any, iters: number): any => {
if (iters >= 80) { if (iters >= 80) {
// currently 66 // currently 66