Skip to content
This repository was archived by the owner on Jan 21, 2022. It is now read-only.

Commit 9887989

Browse files
authored
Merge pull request #135 from Unabashed-Development/bugfixing
Fix for crash on issue #129
2 parents 748b5f1 + 4ed76a5 commit 9887989

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ViewModel/Helpers/NotificationHelper.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ private static void ChatNotifications(object state)
190190
{
191191
foreach (ChatMessage c in unreadChatMessages)
192192
{
193-
if (!ViewModelMediators.ChatWindowFocus[c.FromUserId])
193+
bool dictionaryContainsUser = ViewModelMediators.ChatWindowFocus.ContainsKey(c.FromUserId);
194+
if ((dictionaryContainsUser && !ViewModelMediators.ChatWindowFocus[c.FromUserId]) || !dictionaryContainsUser)
194195
{
195196
Profile chatProfile = Account.Matches.FirstOrDefault(p => p.UserID == c.FromUserId);
196197
ThrowChatMessageNotification(chatProfile.FirstName,

0 commit comments

Comments
 (0)