Skip to content

Commit

Permalink
Merge pull request #35 from EgorMatirov/master
Browse files Browse the repository at this point in the history
Show percentage of battery if timeToEmpty is 0.
  • Loading branch information
cuzbog committed Feb 5, 2015
2 parents 0dafe4f + a76b8b4 commit d847915
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qml/backend/UPower.qml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ UPowerConnection {

if (device.state == UPowerDeviceState.Charging) {
return "%1 until full".arg(DateUtils.shortDuration(device.timeToFull * 1000, 'm'))
} else if (device.state == UPowerDeviceState.Discharging) {
} else if (device.state == UPowerDeviceState.Discharging && device.timeToEmpty != 0) {
return "%1 remaining".arg(DateUtils.shortDuration(device.timeToEmpty * 1000, 'm'))
} else if (device.state == UPowerDeviceState.FullyCharged) {
return "Fully Charged"
Expand Down

0 comments on commit d847915

Please sign in to comment.