Skip to content

Commit

Permalink
fixed fully charged bug deinstapel#108
Browse files Browse the repository at this point in the history
  • Loading branch information
mastercaution committed Apr 4, 2020
1 parent fc876ac commit 1498f22
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/indicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,7 @@ var CPUFreqIndicator = class CPUFreqIndicator extends baseindicator.CPUFreqBaseI
}

powerActions(powerState) {
if (powerState === UPower.DeviceState.FULLY_CHARGED)
{
global.log ("Power state changed: fully charged");
}
else if (powerState === UPower.DeviceState.DISCHARGING)
if (powerState === UPower.DeviceState.DISCHARGING)
{
global.log ("Power state changed: discharging");
// switch to battery profile if auto switching is enabled
Expand All @@ -135,9 +131,13 @@ var CPUFreqIndicator = class CPUFreqIndicator extends baseindicator.CPUFreqBaseI
}
}
}
else if (powerState === UPower.DeviceState.CHARGING)
else if (powerState === UPower.DeviceState.CHARGING ||
powerState === UPower.DeviceState.FULLY_CHARGED)
{
global.log ("Power state changed: charging");
if (powerState === UPower.DeviceState.CHARGING)
global.log ("Power state changed: charging");
else
global.log ("Power state changed: fully charged");
// switch to AC profile if auto switching is enabled
if (this.isAutoSwitchActive)
{
Expand Down

0 comments on commit 1498f22

Please sign in to comment.