You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let path = (result.getConfigDir() / filename).changeFileExt("kdl")
213
+
214
+
try:
215
+
result.prefs = initKPrefs(
216
+
path = path,
217
+
default = initPrefs()
218
+
)
219
+
except KdlError:
220
+
let m = messageBox(result.config.name, &"Corrupt preferences file {path}.\nYou cannot continue using the app until it is fixed.\nYou may fix it manually or do you want to delete it and reset its content? You cannot undo this action", DialogType.OkCancel, IconType.Error, Button.No)
221
+
if m == Button.Yes:
222
+
discard tryRemoveFile(path)
223
+
result.prefs = initKPrefs(
224
+
path = path,
225
+
default = initPrefs()
226
+
)
227
+
else:
228
+
raise
255
229
256
230
template initFonts(app: var App) =
257
231
# Merge ForkAwesome icon font
@@ -277,6 +251,8 @@ template initFonts(app: var App) =
if setting.fileCache.isNil ornot setting.fileCache.isReady:
96
-
""
97
-
else:
98
-
^setting.fileCache
99
+
ifnot setting.fileCache.flowvar.isNil and setting.fileCache.flowvar.isReady and (let val =^setting.fileCache.flowvar; val.len >0):
100
+
setting.fileCache = (val: val, flowvar: nil) # Here we set flowvar to nil because once we acquire it's value it's not neccessary until it's spawned again
ifnot setting.filesCache.flowvar.isNil and setting.filesCache.flowvar.isReady and (let val =^setting.filesCache.flowvar; val.len >0):
111
+
setting.filesCache = (val: val, flowvar: nil) # Here we set flowvar to nil because once we acquire it's value it's not neccessary until it's spawned again
ifnot setting.folderCache.flowvar.isNil and setting.folderCache.flowvar.isReady and (let val =^setting.folderCache.flowvar; val.len >0):
123
+
setting.folderCache = (val: val, flowvar: nil) # Here we set flowvar to nil because once we acquire it's value it's not neccessary until it's spawned again
0 commit comments