1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

Merge pull request #623 from avktech78/charge-fix

Fix display of the status of multiple batteries
This commit is contained in:
purian23
2025-11-04 00:24:59 -05:00
committed by GitHub

View File

@@ -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)