Browse Source

Set default theme if not set

Zed 6 năm trước cách đây
mục cha
commit
08845922f4
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      src/prefs.nim

+ 2 - 0
src/prefs.nim

@@ -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)