summaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorAAGaming <aa@mail.catvibers.me>2022-09-05 11:24:04 -0400
committerAAGaming <aa@mail.catvibers.me>2022-09-05 11:24:04 -0400
commit501145a210d8d8a222d86b420ba8538474ff7723 (patch)
tree73cf35afe2fe126c7abc808b1079aa58ef716329 /frontend
parent843e03b42c7a33ba081be7ccde50f08c8f8d4812 (diff)
downloaddecky-loader-501145a210d8d8a222d86b420ba8538474ff7723.tar.gz
decky-loader-501145a210d8d8a222d86b420ba8538474ff7723.zip
fix(toasts): handle toasts ingame properly without useComposition hack
Diffstat (limited to 'frontend')
-rw-r--r--frontend/src/components/Toast.tsx14
-rw-r--r--frontend/src/toaster.tsx1
2 files changed, 0 insertions, 15 deletions
diff --git a/frontend/src/components/Toast.tsx b/frontend/src/components/Toast.tsx
index 9a74eb5d..abd8214b 100644
--- a/frontend/src/components/Toast.tsx
+++ b/frontend/src/components/Toast.tsx
@@ -28,21 +28,7 @@ const templateClasses = findModule((mod) => {
return false;
});
-const useComposition = findModuleChild((m: any) => {
- if (typeof m !== 'object') return false;
- for (let prop in m) {
- if (m[prop]?.toString()?.includes('.Get().ChangeMinimumCompositionStateRequest')) return m[prop];
- }
- return false;
-});
-
const Toast: FunctionComponent<ToastProps> = ({ toast }) => {
- const composition = useComposition(2); // 2: overlay
- useEffect(() => {
- return () => {
- composition.releaseComposition();
- };
- }, []);
return (
<div
style={{ '--toast-duration': `${toast.nToastDurationMS}ms` } as React.CSSProperties}
diff --git a/frontend/src/toaster.tsx b/frontend/src/toaster.tsx
index f42eb3f5..b0c8671a 100644
--- a/frontend/src/toaster.tsx
+++ b/frontend/src/toaster.tsx
@@ -79,7 +79,6 @@ class Toaster extends Logger {
return;
window.NotificationStore.m_rgNotificationToasts.push(toastData);
window.NotificationStore.DispatchNextToast();
- window.NotificationStore.m_rgNotificationToasts.pop();
}
deinit() {