diff options
| author | AAGaming <aagaming@riseup.net> | 2024-07-18 01:20:29 -0400 |
|---|---|---|
| committer | AAGaming <aagaming@riseup.net> | 2024-08-03 14:04:19 -0400 |
| commit | 88e7919a12fd56b297e73afb3fb05483f5893f4d (patch) | |
| tree | 4b6920d6f8675e6d6de8f2de0df4b4477746a879 /frontend/src/errorboundary-hook.tsx | |
| parent | 28c7254ef6952d9504472ebcbb05238b50aa6086 (diff) | |
| download | decky-loader-88e7919a12fd56b297e73afb3fb05483f5893f4d.tar.gz decky-loader-88e7919a12fd56b297e73afb3fb05483f5893f4d.zip | |
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)
Diffstat (limited to 'frontend/src/errorboundary-hook.tsx')
| -rw-r--r-- | frontend/src/errorboundary-hook.tsx | 10 |
1 files changed, 5 insertions, 5 deletions
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() { |
