move internal state from settings.json to state.json

This commit is contained in:
Vendicated
2024-01-07 02:26:18 +01:00
parent 779c8fa516
commit 4074e8d6ac
8 changed files with 60 additions and 29 deletions

View File

@@ -144,4 +144,11 @@ export class SettingsStore<T extends object> {
listeners.delete(cb);
if (!listeners.size) this.pathListeners.delete(path as string);
}
/**
* Call all global change listeners
*/
public markAsChanged() {
this.globalListeners.forEach(cb => cb(this.plain, ""));
}
}