From e1f06b7139faf6d49a9bdffa370c043b9774d9a0 Mon Sep 17 00:00:00 2001 From: Oleksandr <94455603+avktech78@users.noreply.github.com> Date: Tue, 4 Nov 2025 07:22:26 +0200 Subject: [PATCH] Fix display of the status of multiple batteries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When there are several batteries, one of them is fully charged, and the other is discharging, this leads to the incorrect display of the overall status as “Charging” --- Services/BatteryService.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Services/BatteryService.qml b/Services/BatteryService.qml index 092094d0..90f2eb84 100644 --- a/Services/BatteryService.qml +++ b/Services/BatteryService.qml @@ -51,7 +51,7 @@ Singleton { } return Math.round((batteryEnergy * 100) / batteryCapacity) } - readonly property bool isCharging: batteryAvailable && batteries.some(b => b.state === UPowerDeviceState.Charging || b.state === UPowerDeviceState.FullyCharged) + readonly property bool isCharging: batteryAvailable && batteries.some(b => b.state === UPowerDeviceState.Charging) // Is the system plugged in (none of the batteries are discharging or empty) readonly property bool isPluggedIn: batteryAvailable && batteries.every(b => b.state !== UPowerDeviceState.Discharging)