mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-13 12:15:09 +03:00
fix: support new minified class names
bumps decky-frontend-lib to 3.25.0 can't stop us THAT easily :P
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"decky-frontend-lib": "3.24.5",
|
||||
"decky-frontend-lib": "3.25.0",
|
||||
"filesize": "^10.0.7",
|
||||
"i18next": "^23.2.1",
|
||||
"i18next-http-backend": "^2.2.1",
|
||||
|
||||
Generated
+4
-6
@@ -6,8 +6,8 @@ settings:
|
||||
|
||||
dependencies:
|
||||
decky-frontend-lib:
|
||||
specifier: 3.24.5
|
||||
version: 3.24.5
|
||||
specifier: 3.25.0
|
||||
version: 3.25.0
|
||||
filesize:
|
||||
specifier: ^10.0.7
|
||||
version: 10.0.7
|
||||
@@ -1482,8 +1482,8 @@ packages:
|
||||
dependencies:
|
||||
ms: 2.1.2
|
||||
|
||||
/decky-frontend-lib@3.24.5:
|
||||
resolution: {integrity: sha512-eYlbKDOOcIBPI0b76Rqvlryq2ym/QNiry4xf2pFrXmBa1f95dflqbQAb2gTq9uHEa5gFmeV4lUcMPGJ3M14Xqw==}
|
||||
/decky-frontend-lib@3.25.0:
|
||||
resolution: {integrity: sha512-2lBoHS2AIRmuluq/bGdHBz+uyToQE7k3K/vDq1MQbDZ4eC+8CGDuh2T8yZOj3D0yjGP2MdikNNAWPA9Z5l2qDg==}
|
||||
dev: false
|
||||
|
||||
/decode-named-character-reference@1.0.2:
|
||||
@@ -3200,7 +3200,6 @@ packages:
|
||||
prop-types: 15.8.1
|
||||
react: 16.14.0
|
||||
scheduler: 0.19.1
|
||||
bundledDependencies: false
|
||||
|
||||
/react-file-icon@1.3.0(react-dom@16.14.0)(react@16.14.0):
|
||||
resolution: {integrity: sha512-wxl/WwSX5twQKVXloPHbS71iZQUKO84KgZ44Kh7vYZGu1qH2kagx+RSTNfk/+IHtXfjPWPNIHPGi2Y8S94N1CQ==}
|
||||
@@ -3284,7 +3283,6 @@ packages:
|
||||
loose-envify: 1.4.0
|
||||
object-assign: 4.1.1
|
||||
prop-types: 15.8.1
|
||||
bundledDependencies: false
|
||||
|
||||
/readable-stream@2.3.8:
|
||||
resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==}
|
||||
|
||||
@@ -3,6 +3,7 @@ import {
|
||||
Patch,
|
||||
ToastData,
|
||||
afterPatch,
|
||||
findClass,
|
||||
findInReactTree,
|
||||
findModuleChild,
|
||||
getReactRoot,
|
||||
@@ -48,16 +49,20 @@ class Toaster extends Logger {
|
||||
// ));
|
||||
let instance: any;
|
||||
const tree = getReactRoot(document.getElementById('root') as any);
|
||||
const toasterClass1 = findClass('GamepadToastPlaceholder');
|
||||
const toasterClass2 = findClass('ToastPlaceholder');
|
||||
const toasterClass3 = findClass('ToastPopup');
|
||||
const toasterClass4 = findClass('GamepadToastPopup');
|
||||
const findToasterRoot = (currentNode: any, iters: number): any => {
|
||||
if (iters >= 80) {
|
||||
// currently 66
|
||||
return null;
|
||||
}
|
||||
if (
|
||||
currentNode?.memoizedProps?.className?.startsWith?.('gamepadtoasts_GamepadToastPlaceholder') ||
|
||||
currentNode?.memoizedProps?.className?.startsWith?.('toastmanager_ToastPlaceholder') ||
|
||||
currentNode?.memoizedProps?.className?.startsWith?.('toastmanager_ToastPopup') ||
|
||||
currentNode?.memoizedProps?.className?.startsWith?.('gamepadtoasts_GamepadToastPopup')
|
||||
currentNode?.memoizedProps?.className?.startsWith?.(toasterClass1) ||
|
||||
currentNode?.memoizedProps?.className?.startsWith?.(toasterClass2) ||
|
||||
currentNode?.memoizedProps?.className?.startsWith?.(toasterClass3) ||
|
||||
currentNode?.memoizedProps?.className?.startsWith?.(toasterClass4)
|
||||
) {
|
||||
this.log(`Toaster root was found in ${iters} recursion cycles`);
|
||||
return currentNode;
|
||||
|
||||
Reference in New Issue
Block a user