No need to check monitors all the times

This commit is contained in:
quadbyte 2025-08-19 19:32:05 -04:00
parent 170502259e
commit faafdc0644

View file

@ -82,16 +82,19 @@ Singleton {
reload() reload()
} }
onLoaded: function () { onLoaded: function () {
Logger.log("Settings", "OnLoaded")
Qt.callLater(function () { Qt.callLater(function () {
if (isInitialLoad) {
Logger.log("Settings", "OnLoaded")
// Only set wallpaper on initial load, not on reloads // Only set wallpaper on initial load, not on reloads
if (isInitialLoad && adapter.wallpaper.current !== "") { if (adapter.wallpaper.current !== "") {
Logger.log("Settings", "Set current wallpaper", adapter.wallpaper.current) Logger.log("Settings", "Set current wallpaper", adapter.wallpaper.current)
WallpaperService.setCurrentWallpaper(adapter.wallpaper.current, true) WallpaperService.setCurrentWallpaper(adapter.wallpaper.current, true)
} }
// Validate monitor configurations - if none of the configured monitors exist, clear the lists // Validate monitor configurations, only once
// if none of the configured monitors exist, clear the lists
validateMonitorConfigurations() validateMonitorConfigurations()
}
isInitialLoad = false isInitialLoad = false
}) })