fix(namepool): load theme from disk correctly

The Load() function wasn't reading the saved theme because the condition
p.Theme == "" was never true after NewNamePool() set it to "mad-max".
Now the loaded theme properly overrides constructor defaults.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-21 00:35:47 -08:00
parent 5a75ca5944
commit 842819cce6

View File

@@ -156,11 +156,11 @@ func (p *NamePool) Load() error {
return err
}
// Preserve the theme and custom names if already set
if p.Theme == "" && loaded.Theme != "" {
// Load theme and custom names from disk (overrides constructor defaults)
if loaded.Theme != "" {
p.Theme = loaded.Theme
}
if len(p.CustomNames) == 0 && len(loaded.CustomNames) > 0 {
if len(loaded.CustomNames) > 0 {
p.CustomNames = loaded.CustomNames
}