Wallpaper: delay service initialization until settings are ready
This commit is contained in:
parent
7c6c908076
commit
c37ef867a1
4 changed files with 12 additions and 17 deletions
|
|
@ -89,18 +89,16 @@ Singleton {
|
|||
reload()
|
||||
}
|
||||
onLoaded: function () {
|
||||
Qt.callLater(function () {
|
||||
// Some stuff like settings validation should just be executed once on startup and not on every reload
|
||||
if (!isLoaded) {
|
||||
Logger.log("Settings", "JSON completed loading")
|
||||
if (!isLoaded) {
|
||||
Logger.log("Settings", "----------------------------")
|
||||
Logger.log("Settings", "Settings loaded successfully")
|
||||
isLoaded = true
|
||||
|
||||
// Validate monitor configurations, only once
|
||||
// if none of the configured monitors exist, clear the lists
|
||||
Qt.callLater(function () {
|
||||
// Some stuff like settings validation should just be executed once on startup and not on every reload
|
||||
validateMonitorConfigurations()
|
||||
|
||||
isLoaded = true
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
onLoadFailed: function (error) {
|
||||
if (error.toString().includes("No such file") || error === 2)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue