From 46b89ef0f9450c78ed84b5ea2b23ed0bfa1b8ad3 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Thu, 14 Nov 2019 21:40:40 +0100 Subject: [PATCH] Misc --- ArchiSteamFarm/ArchiHandler.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ArchiSteamFarm/ArchiHandler.cs b/ArchiSteamFarm/ArchiHandler.cs index 7030e7835..7b8651b1b 100644 --- a/ArchiSteamFarm/ArchiHandler.cs +++ b/ArchiSteamFarm/ArchiHandler.cs @@ -795,15 +795,14 @@ namespace ArchiSteamFarm { JobID = jobID; - if (msg.notifications == null) { - // We might get null body here, and that means there are no notifications related to trading - Notifications = new Dictionary(1) { { EUserNotification.Trading, 0 } }; + // We might get null body here, and that means there are no notifications related to trading + // TODO: Check if this workaround is still needed + Notifications = new Dictionary { { EUserNotification.Trading, 0 } }; + if (msg.notifications == null) { return; } - Notifications = new Dictionary(msg.notifications.Count); - foreach (CMsgClientUserNotifications.Notification notification in msg.notifications) { EUserNotification type = (EUserNotification) notification.user_notification_type;