Skip to content

Commit

Permalink
only move the unread counter up
Browse files Browse the repository at this point in the history
  • Loading branch information
Trolldemorted committed Apr 27, 2018
1 parent c122538 commit 068bc2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Signal-Windows.Lib/Storage/DB.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ internal static void UpdateMessageRead(long index, SignalConversation conversati
if (contact != null)
{
contact.LastSeenMessageIndex = index;
contact.UnreadCount = (uint)(contact.MessagesCount - index);
contact.UnreadCount = Math.Max(contact.UnreadCount, (uint)(contact.MessagesCount - index));
}
}
else
Expand All @@ -1011,7 +1011,7 @@ internal static void UpdateMessageRead(long index, SignalConversation conversati
if (group != null)
{
group.LastSeenMessageIndex = index;
group.UnreadCount = (uint)(group.MessagesCount - index);
group.UnreadCount = Math.Max(group.UnreadCount, (uint)(group.MessagesCount - index));
}
}
ctx.SaveChanges();
Expand Down

0 comments on commit 068bc2d

Please sign in to comment.