Set default theme if not set

This commit is contained in:
Zed 2019-10-28 04:10:21 +01:00
parent 51a5c473ae
commit 08845922f4

View file

@ -49,6 +49,8 @@ proc getPrefs*(id: string; cfg: Config): Prefs =
withDb:
try:
result.getOne("id = ?", id)
if result.theme.len == 0:
result.theme = cfg.defaultTheme
except KeyError:
result = getDefaultPrefs(cfg)