chore(refactor): remove SyncManager

This commit is contained in:
Paul Makles
2022-06-29 16:41:26 +01:00
parent fedb5a1e60
commit d2f06ca62c
5 changed files with 52 additions and 82 deletions

View File

@@ -41,7 +41,6 @@ type Plugin = {
* ```typescript
* function (state: State) {
* return {
* onClient: (client: Client) => {},
* onUnload: () => {}
* }
* }
@@ -59,7 +58,6 @@ type Plugin = {
type Instance = {
format: 1;
onClient?: (client: Client) => void;
onUnload?: () => void;
};
@@ -231,13 +229,4 @@ export default class Plugins implements Store, Persistent<Data> {
localforage.removeItem("revite:plugins");
window.location.reload();
}
/**
* Push client through to plugins
*/
onClient(client: Client) {
for (const instance of this.instances.values()) {
instance.onClient?.(client);
}
}
}