Fix handling of fully charged state

Resolves #1
This commit is contained in:
Martin Zurowietz 2018-09-17 09:28:04 +02:00
parent 5d6f63d6cf
commit 3a910c86c2

View file

@ -10,7 +10,9 @@ var Indicator = new Lang.Class({
_getTime() { _getTime() {
let seconds = 0; let seconds = 0;
if (this._proxy.State == UPower.DeviceState.CHARGING) { if (this._proxy.State == UPower.DeviceState.FULLY_CHARGED) {
return '';
} else if (this._proxy.State == UPower.DeviceState.CHARGING) {
seconds = this._proxy.TimeToFull; seconds = this._proxy.TimeToFull;
} else if (this._proxy.State == UPower.DeviceState.DISCHARGING) { } else if (this._proxy.State == UPower.DeviceState.DISCHARGING) {
seconds = this._proxy.TimeToEmpty; seconds = this._proxy.TimeToEmpty;