Bughunt: smooth UI actions and skip redundant settings updates

This commit is contained in:
Sucukdeluxe
2026-02-27 17:15:20 +01:00
parent 6b65da7f66
commit c83fa3b86a
3 changed files with 164 additions and 19 deletions
+7 -1
View File
@@ -70,11 +70,17 @@ export class AppController {
}
public updateSettings(partial: Partial<AppSettings>): AppSettings {
this.settings = normalizeSettings({
const nextSettings = normalizeSettings({
...defaultSettings(),
...this.settings,
...partial
});
if (JSON.stringify(nextSettings) === JSON.stringify(this.settings)) {
return this.settings;
}
this.settings = nextSettings;
saveSettings(this.storagePaths, this.settings);
this.manager.setSettings(this.settings);
return this.settings;