mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-08 01:45:28 +00:00
chore(refactor): remove SyncManager
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user