Skip to content

Commit 76656ab

Browse files
dlamannaclaude
andcommitted
fix: bootstrap screenAreas on first run after upgrade
WriteSettings(false) only logged — screenAreas was never written to disk until a setting was manually changed. Now writes to file on startup if screenAreas is missing, so the new setting gets seeded immediately. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5b068d3 commit 76656ab

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

DesktopShell/Settings.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,13 @@ public static void ScanSettings()
181181
EnableTCPServer = true;
182182
GlobalVar.Log("^^^ Settings::ScanSettings() - enableTCPServer missing; defaulting to true");
183183
}
184-
WriteSettings(false);
184+
185+
// Write to file if screenAreas is missing (bootstraps new setting),
186+
// otherwise just log.
187+
bool needsRewrite = ScreenAreas.Count == 0;
188+
WriteSettings(needsRewrite);
189+
if (needsRewrite)
190+
GlobalVar.Log("^^^ Settings::ScanSettings() - screenAreas missing; wrote settings to bootstrap");
185191
}
186192
catch (IOException e)
187193
{

0 commit comments

Comments
 (0)