ArchUpdater: fixed CPU hogging

This commit is contained in:
LemmyCook 2025-08-25 13:44:23 -04:00
parent 7a849806fb
commit b19fb316d9
3 changed files with 16 additions and 26 deletions

View file

@ -13,19 +13,9 @@ NPanel {
panelHeight: 500 * scaling
panelAnchorRight: true
// Auto-refresh when service updates
Connections {
target: ArchUpdaterService
function onUpdatePackagesChanged() {
// Force UI update when packages change
if (root.visible) {
// Small delay to ensure data is fully updated
Qt.callLater(() => {
// Force a UI update by triggering a property change
ArchUpdaterService.updatePackages = ArchUpdaterService.updatePackages
}, 100)
}
}
// When the panel opens
onOpened: {
ArchUpdaterService.doPoll()
}
panelContent: Rectangle {