feat(FN-2018): merge fusion/fn-2018

This commit is contained in:
gsxdsm
2026-04-17 15:25:02 -07:00
parent 759075bdb0
commit 24513716e4
6 changed files with 82 additions and 17 deletions

View File

@@ -1024,7 +1024,7 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
}
return this.withConfigLock(async () => {
const config = await this.readConfig();
const config = this.readConfigFast();
// Handle null values as "delete this key from settings"
// This allows the frontend to explicitly clear a setting by sending null
@@ -1132,10 +1132,8 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
*/
async updateGlobalSettings(patch: Partial<GlobalSettings>): Promise<Settings> {
// Read previous state BEFORE writing so the diff is correct
const [previousGlobal, config] = await Promise.all([
this.globalSettingsStore.getSettings(),
this.readConfig(),
]);
const previousGlobal = await this.globalSettingsStore.getSettings();
const config = this.readConfigFast();
const previous: Settings = { ...DEFAULT_SETTINGS, ...previousGlobal, ...config.settings } as Settings;
const updatedGlobal = await this.globalSettingsStore.updateSettings(patch);