Skip to content

Commit

Permalink
Make sure the user cookie is valid before loading the badge pages
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasNilson committed Oct 4, 2022
1 parent e3f6c8f commit e36da30
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Source/IdleMasterExtended/frmMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,6 @@ private async void tmrReadyToGo_Tick(object sender, EventArgs e)
if (!IsCookieReady || !IsSteamReady)
return;

// Update the form elements
if (Settings.Default.showUsername)
{
lblSignedOnAs.Text = SteamProfile.GetSignedAs();
Expand All @@ -1252,10 +1251,15 @@ private async void tmrReadyToGo_Tick(object sender, EventArgs e)

tmrReadyToGo.Enabled = false;

// Call the loadBadges() function asynchronously
await LoadBadgesAsync();

StartIdle();
if (await CookieClient.IsLogined())
{
await LoadBadgesAsync();
StartIdle();
}
else
{
ResetClientStatus();
}
}

private async void tmrCardDropCheck_Tick(object sender, EventArgs e)
Expand Down

0 comments on commit e36da30

Please sign in to comment.