From 3a910c86c20ac4bef4b7f85bc28a5273d51218f6 Mon Sep 17 00:00:00 2001 From: Martin Zurowietz Date: Mon, 17 Sep 2018 09:28:04 +0200 Subject: [PATCH] Fix handling of fully charged state Resolves #1 --- batime@martin.zurowietz.de/power.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/batime@martin.zurowietz.de/power.js b/batime@martin.zurowietz.de/power.js index ccd8877..b0cc103 100644 --- a/batime@martin.zurowietz.de/power.js +++ b/batime@martin.zurowietz.de/power.js @@ -10,7 +10,9 @@ var Indicator = new Lang.Class({ _getTime() { 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; } else if (this._proxy.State == UPower.DeviceState.DISCHARGING) { seconds = this._proxy.TimeToEmpty;