Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
seerge committed Nov 11, 2024
1 parent 5968788 commit dba6b1a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,9 @@ public SettingsForm()
labelCharge.Click += LabelCharge_Click;

buttonDonate.Click += ButtonDonate_Click;

if (AppConfig.Get("start_count") > 10 && !AppConfig.Is("donate_click"))

int click = AppConfig.Get("donate_click");
if (AppConfig.Get("start_count") >= ((click <= 0) ? 10 : click + 50))
{
buttonDonate.BorderColor = colorTurbo;
buttonDonate.Badge = true;
Expand All @@ -293,7 +294,7 @@ private void LabelBattery_Click(object? sender, EventArgs e)

private void ButtonDonate_Click(object? sender, EventArgs e)
{
AppConfig.Set("donate_click", 1);
AppConfig.Set("donate_click", AppConfig.Get("start_count"));
buttonDonate.Badge = false;
Process.Start(new ProcessStartInfo("https://g-helper.com/support") { UseShellExecute = true });
}
Expand Down

0 comments on commit dba6b1a

Please sign in to comment.