docs: correct theme-fix rationale — local SQLite, not remote MySQL
The settings store is backed by the LOCAL SQLite config DB (wired before the slow remote-MySQL logbook connect), so the "not ready" window is the brief startup gap before OnStartup builds the store, not a MySQL delay. Fix behaviour is unchanged; only the comments and changelog wording are corrected.
This commit is contained in:
@@ -1835,12 +1835,13 @@ func (a *App) groupDigitalSlots() bool {
|
||||
|
||||
func (a *App) GetUIPref(key string) (string, error) {
|
||||
if a.settings == nil {
|
||||
// Distinct from a genuinely-empty pref: the settings store isn't wired yet
|
||||
// (still connecting the logbook DB — can take seconds on remote MySQL). The
|
||||
// UI uses the error to keep RETRYING rather than treat it as "unset" and
|
||||
// fall back to a default (the "dark theme reverts to light after an update"
|
||||
// bug — localStorage was cleared by the update, and the DB read gave up too
|
||||
// early while the backend was still starting).
|
||||
// Distinct from a genuinely-empty pref: the (LOCAL SQLite) settings store
|
||||
// isn't wired yet. There's a brief window at launch where the frontend can
|
||||
// call this before OnStartup has opened the DB and built the store. The UI
|
||||
// uses the error to keep RETRYING rather than treat it as "unset" and fall
|
||||
// back to a default — the "dark theme reverts to light after an update" bug
|
||||
// (the update cleared localStorage, and the DB read gave up too early while
|
||||
// the store was still coming up).
|
||||
return "", fmt.Errorf("settings store not ready")
|
||||
}
|
||||
return a.settings.Get(a.ctx, "ui."+key)
|
||||
|
||||
Reference in New Issue
Block a user