Change IsPluggedIn logic (#1859)

Co-authored-by: Iris <[email protected]>
This commit is contained in:
IrisandIris authored and GitHub committed 2026-02-27 09:45:52 -05:00
1 parent fbc1ff62c7
commit 4da22a4345
1 file changed
+2 -2
+2 -2
View File
@@ -56,8 +56,8 @@ Singleton {
}
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)
// Is the system plugged in (Is not running on battery)
readonly property bool isPluggedIn: !UPower.onBattery
readonly property bool isLowBattery: batteryAvailable && batteryLevel <= 20
onIsPluggedInChanged: {