fix duplicate onActiveChanged in cpu applet

This commit is contained in:
Damocles 2026-04-27 18:21:32 +02:00
parent d85b65c6d9
commit e7bf175169

View file

@ -11,6 +11,7 @@ Column {
required property color accentColor
property bool active: true
property bool locked: false
property bool _coreActive: false
onActiveChanged: {
@ -21,6 +22,8 @@ Column {
_coreActive = false;
S.SystemStats.coreConsumers--;
}
if (active)
_cpuHistory = [];
}
Component.onDestruction: if (_coreActive)
S.SystemStats.coreConsumers--
@ -171,8 +174,6 @@ Column {
}
property var _cpuHistory: []
onActiveChanged: if (active)
_cpuHistory = []
Connections {
target: S.SystemStats
function onCpuUsageChanged() {