Merge pull request #8 from Mershl/pending-charge-handling

Add handling for PENDING_CHARGE state
This commit is contained in:
Martin Zurowietz 2022-02-22 21:20:07 +01:00 committed by GitHub
commit 062516ed9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,8 +14,10 @@ var Indicator = GObject.registerClass(
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;
} else if (this._proxy.State === UPower.DeviceState.PENDING_CHARGE) {
return '';
} else { } else {
// state is one of PENDING_CHARGING, PENDING_DISCHARGING // state is PENDING_DISCHARGE or UNKNOWN
return _('Estimating…'); return _('Estimating…');
} }