diff --git a/app/Battery/BatteryControl.cs b/app/Battery/BatteryControl.cs index 82559ad6..e2c88ca3 100644 --- a/app/Battery/BatteryControl.cs +++ b/app/Battery/BatteryControl.cs @@ -3,6 +3,12 @@ internal class BatteryControl { + public static void ToggleBatteryLimitFull() + { + if (AppConfig.Is("charge_full")) SetBatteryChargeLimit(); + else SetBatteryLimitFull(); + } + public static void SetBatteryLimitFull() { AppConfig.Set("charge_full", 1); diff --git a/app/Settings.cs b/app/Settings.cs index 035ccf94..181a8b06 100644 --- a/app/Settings.cs +++ b/app/Settings.cs @@ -214,7 +214,7 @@ namespace GHelper private void ButtonBatteryFull_Click(object? sender, EventArgs e) { - BatteryControl.SetBatteryLimitFull(); + BatteryControl.ToggleBatteryLimitFull(); } private void ButtonBatteryFull_MouseLeave(object? sender, EventArgs e)