From 88e7919a12fd56b297e73afb3fb05483f5893f4d Mon Sep 17 00:00:00 2001
From: AAGaming <aagaming@riseup.net>
Date: Thu, 18 Jul 2024 01:20:29 -0400
Subject: implement new toaster hook

this also supports the notification list and probably also desktop toasts (UI wip, read location enum prop from toast component probably)
---
 frontend/src/errorboundary-hook.tsx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'frontend/src/errorboundary-hook.tsx')

diff --git a/frontend/src/errorboundary-hook.tsx b/frontend/src/errorboundary-hook.tsx
index 072c96ca..95be77ab 100644
--- a/frontend/src/errorboundary-hook.tsx
+++ b/frontend/src/errorboundary-hook.tsx
@@ -69,13 +69,13 @@ class ErrorBoundaryHook extends Logger {
     });
 
     if (!ErrorBoundary) {
-      this.error('could not find ValveErrorBoundary');
+      this.error('@decky/ui could not find ErrorBoundary, skipping patch');
       return;
     }
 
     this.errorBoundaryPatch = replacePatch(ErrorBoundary.prototype, 'render', function (this: any) {
       if (this.state._deckyForceRerender) {
-        const stateClone = {...this.state, _deckyForceRerender: null};
+        const stateClone = { ...this.state, _deckyForceRerender: null };
         this.setState(stateClone);
         return null;
       }
@@ -93,9 +93,9 @@ class ErrorBoundaryHook extends Logger {
       return callOriginal;
     });
     // Small hack that gives us a lot more flexibility to force rerenders.
-    ValveErrorBoundary.prototype._deckyForceRerender = function (this: any) {
-      this.setState({...this.state, _deckyForceRerender: true});
-    }
+    ErrorBoundary.prototype._deckyForceRerender = function (this: any) {
+      this.setState({ ...this.state, _deckyForceRerender: true });
+    };
   }
 
   public temporarilyDisableReporting() {
-- 
cgit v1.2.3

