Init: better widget upgrading process + less warnings when starting up without config or cache

This commit is contained in:
LemmyCook 2025-09-08 08:39:56 -04:00
parent b43b065cf2
commit 3271fa1d23
6 changed files with 32 additions and 27 deletions

View file

@ -102,7 +102,8 @@ Singleton {
// FileView to load custom colors data from colors.json
FileView {
id: customColorsFile
path: Settings.directoriesCreated ? (Settings.configDir + "colors.json") : ""
path: Settings.directoriesCreated ? (Settings.configDir + "colors.json") : undefined
printErrors: false
watchChanges: true
onFileChanged: {
Logger.log("Color", "Reloading colors from disk")
@ -115,7 +116,7 @@ Singleton {
// Trigger initial load when path changes from empty to actual path
onPathChanged: {
if (path === Settings.configDir + "colors.json") {
if (path !== undefined) {
reload()
}
}