diff options
| author | Marco Rodolfi <marco.rodolfi@tuta.io> | 2023-02-07 02:30:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-06 17:30:44 -0800 |
| commit | 3e120ea312dc303c66c9e2e0a607a1ae2ebdfc37 (patch) | |
| tree | d73fcf39a064db7ac565f7484a10616247c43d29 /frontend | |
| parent | 0b718daa47a957f90066859ab96a3ca6f9253575 (diff) | |
| download | decky-loader-3e120ea312dc303c66c9e2e0a607a1ae2ebdfc37.tar.gz decky-loader-3e120ea312dc303c66c9e2e0a607a1ae2ebdfc37.zip | |
Fix class name shenanigans for toast notification (#366)v2.5.3-pre3
* Fix class name shenanigans for toast notification
* Corrected number of iterations
Diffstat (limited to 'frontend')
| -rw-r--r-- | frontend/src/toaster.tsx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/frontend/src/toaster.tsx b/frontend/src/toaster.tsx index 1b2e9b80..b636d7b3 100644 --- a/frontend/src/toaster.tsx +++ b/frontend/src/toaster.tsx @@ -40,11 +40,14 @@ class Toaster extends Logger { let instance: any; const tree = (document.getElementById('root') as any)._reactRootContainer._internalRoot.current; const findToasterRoot = (currentNode: any, iters: number): any => { - if (iters >= 50) { - // currently 40 + if (iters >= 65) { + // currently 65 return null; } - if (currentNode?.memoizedProps?.className?.startsWith?.('toastmanager_ToastPlaceholder')) { + if ( + currentNode?.memoizedProps?.className?.startsWith?.('toastmanager_ToastPlaceholder') || + currentNode?.memoizedProps?.className?.startsWith?.('toastmanager_ToastPopup') + ) { this.log(`Toaster root was found in ${iters} recursion cycles`); return currentNode; } |
