diff --git a/config/dynamic.ts b/config/dynamic.ts index 6e93dd45..c05e49c4 100644 --- a/config/dynamic.ts +++ b/config/dynamic.ts @@ -97,7 +97,7 @@ export class PluginConfig { this.config = { ...pluginDefaultConfig, ...pluginConfig }; if (this.enableFront) { - this.#setupFront(); + this.setupFront(); } activePlugins[name] = this; @@ -109,8 +109,8 @@ export class PluginConfig { set(key: keyof ConfigType, value: ValueOf>) { this.config[key] = value; - this.#onChange(key); - this.#save(); + this.onChange(key); + this.save(); } getAll(): ConfigType { @@ -126,7 +126,7 @@ export class PluginConfig { for (const [key, value] of Object.entries(options) as Entries) { if (this.config[key] !== value) { if (value !== undefined) this.config[key] = value; - this.#onChange(key, false); + this.onChange(key, false); changed = true; } } @@ -137,7 +137,7 @@ export class PluginConfig { } } - this.#save(); + this.save(); } getDefaultConfig() { @@ -152,7 +152,7 @@ export class PluginConfig { setAndMaybeRestart(key: keyof ConfigType, value: ValueOf>) { this.config[key] = value; setMenuOptions(this.name, this.config); - this.#onChange(key); + this.onChange(key); } subscribe(valueName: keyof ConfigType, fn: (config: ConfigType) => void) { @@ -164,11 +164,11 @@ export class PluginConfig { } /** Called only from back */ - #save() { + private save() { setOptions(this.name, this.config); } - #onChange(valueName: keyof ConfigType, single: boolean = true) { + private onChange(valueName: keyof ConfigType, single: boolean = true) { this.subscribers[valueName]?.(this.config[valueName] as ConfigType); if (single) { for (const fn of this.allSubscribers) { @@ -177,7 +177,7 @@ export class PluginConfig { } } - #setupFront() { + private setupFront() { const ignoredMethods = ['subscribe', 'subscribeAll']; if (process.type === 'renderer') {