Final fix for #130

This commit is contained in:
JustArchi
2016-02-28 21:24:50 +01:00
parent 6bc715575f
commit c65d6fee5a
2 changed files with 10 additions and 4 deletions

View File

@@ -75,8 +75,11 @@ namespace ArchiSteamFarm {
return;
}
Notifications = new List<Notification>(1);
Notifications.Add(new Notification { NotificationType = Notification.ENotificationType.Items });
if (msg.count_new_items > 0) {
Notifications = new List<Notification>(1) {
new Notification { NotificationType = Notification.ENotificationType.Items }
};
}
}
}

View File

@@ -38,7 +38,7 @@ namespace ArchiSteamFarm {
private readonly Bot Bot;
private readonly string ApiKey;
private readonly Dictionary<string, string> Cookie = new Dictionary<string, string>(3);
private readonly Dictionary<string, string> Cookie = new Dictionary<string, string>(4);
private ulong SteamID;
@@ -109,6 +109,9 @@ namespace ArchiSteamFarm {
Cookie["steamLogin"] = steamLogin;
Cookie["steamLoginSecure"] = steamLoginSecure;
// The below is used for display purposes only
Cookie["webTradeEligibility"] = "{\"allowed\":0,\"reason\":0,\"allowed_at_time\":0,\"steamguard_required_days\":0,\"sales_this_year\":0,\"max_sales_per_year\":0,\"forms_requested\":0}";
await UnlockParentalAccount(parentalPin).ConfigureAwait(false);
return true;
}
@@ -426,7 +429,7 @@ namespace ArchiSteamFarm {
HttpResponseMessage response = null;
for (byte i = 0; i < WebBrowser.MaxRetries && response == null; i++) {
response = await WebBrowser.UrlGet("https://steamcommunity.com/profiles/" + SteamID + "/inventory/", Cookie).ConfigureAwait(false);
response = await WebBrowser.UrlGet("https://steamcommunity.com/profiles/" + SteamID + "/inventory", Cookie).ConfigureAwait(false);
}
if (response == null) {