Optimizations memory/cpu

- Only load bar widgets once the settings are done loading, and the
widget is actually in use.
- Only load bar on screens that request it, instead of hiding it.
This commit is contained in:
LemmyCook 2025-08-25 21:18:49 -04:00
parent 38efdc8f36
commit 9fb4aff635
4 changed files with 86 additions and 83 deletions

View file

@ -18,7 +18,7 @@ Item {
id: loader
anchors.fill: parent
active: enabled && widgetName !== ""
active: Settings.isLoaded && enabled && widgetName !== ""
sourceComponent: {
if (!active) {
return null
@ -35,6 +35,7 @@ Item {
}
}
}
Logger.log("NWidgetLoader", "Loaded", widgetName, "on screen", item.screen.name)
}
}