Skip to content

Commit

Permalink
Notification count instead of wallet balance
Browse files Browse the repository at this point in the history
The class `global_action_link` used to fetch the `header_wallet_balance` is used by other elements, which seem to be problematic.
  • Loading branch information
JonasNilson committed Jan 11, 2023
1 parent 2169376 commit 387cd97
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions Source/IdleMasterExtended/CookieClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,10 @@ public static async Task<bool> IsLogined()
Logger.Exception(ex, "CookieClient -> IsLogined, for url = " + Settings.Default.myProfileURL);
}

// The 'global_action_link' contains the Steam profile wallet ballance. Every logged in user should have it available.
var globalActionLink = document.DocumentNode.SelectSingleNode("//a[@class='global_action_link']");
// The 'notification_count' contains the Steam profile notifications count. Every logged in user should have it available.
var notificationCount = document.DocumentNode.SelectSingleNode("//span[@class='notification_count']");

if (globalActionLink is object && !string.IsNullOrEmpty(globalActionLink.Id))
{
return globalActionLink.Id == "header_wallet_balance";
}
else
{
return false;
}
return !string.IsNullOrEmpty(notificationCount.InnerHtml);
}

protected override WebRequest GetWebRequest(Uri address)
Expand Down

0 comments on commit 387cd97

Please sign in to comment.