Compare commits

...

3 Commits

Author SHA1 Message Date
AAGaming 84a19203c5 fix injecting twice 2022-08-13 11:57:52 -04:00
AAGaming 99cda2907d fix TS errors 2022-08-12 21:02:11 -04:00
AAGaming a38582d158 Fix toaster deinit error 2022-08-12 16:49:28 -04:00
4 changed files with 7 additions and 7 deletions
+1
View File
@@ -98,6 +98,7 @@ class PluginManager:
#await inject_to_tab("SP", "window.syncDeckyPlugins();")
async def loader_reinjector(self):
await sleep(5)
while True:
await sleep(5)
if not await tab_has_global_var("SP", "deckyHasLoaded"):
+1 -2
View File
@@ -14,6 +14,7 @@ declare global {
}
}
(async () => {
window.deckyHasLoaded = true;
await sleep(1000);
window.deckyAuthToken = await fetch('http://127.0.0.1:1337/auth/token').then((r) => r.text());
@@ -38,6 +39,4 @@ declare global {
};
setTimeout(() => window.syncDeckyPlugins(), 5000);
window.deckyHasLoaded = true;
})();
+2 -2
View File
@@ -1,6 +1,6 @@
import { afterPatch, findModuleChild, unpatch } from 'decky-frontend-lib';
import React, { ReactElement, cloneElement, createElement, memo } from 'react';
import type { Route, RouteProps } from 'react-router';
import { ReactElement, ReactNode, cloneElement, createElement, memo } from 'react';
import type { Route } from 'react-router';
import {
DeckyRouterState,
+3 -3
View File
@@ -84,9 +84,9 @@ class Toaster extends Logger {
}
deinit() {
unpatch(this.instanceRet, 'type');
delete this.node.stateNode.render;
this.node.stateNode.forceUpdate();
this.instanceRet && unpatch(this.instanceRet, 'type');
this.node && delete this.node.stateNode.render;
this.node && this.node.stateNode.forceUpdate();
}
}