File tree 1 file changed +2
-2
lines changed
Signal-Windows.Lib/Storage
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1000,7 +1000,7 @@ internal static void UpdateMessageRead(long index, SignalConversation conversati
1000
1000
if ( contact != null )
1001
1001
{
1002
1002
contact . LastSeenMessageIndex = index ;
1003
- contact . UnreadCount = ( uint ) ( contact . MessagesCount - index ) ;
1003
+ contact . UnreadCount = Math . Max ( contact . UnreadCount , ( uint ) ( contact . MessagesCount - index ) ) ;
1004
1004
}
1005
1005
}
1006
1006
else
@@ -1011,7 +1011,7 @@ internal static void UpdateMessageRead(long index, SignalConversation conversati
1011
1011
if ( group != null )
1012
1012
{
1013
1013
group . LastSeenMessageIndex = index ;
1014
- group . UnreadCount = ( uint ) ( group . MessagesCount - index ) ;
1014
+ group . UnreadCount = Math . Max ( group . UnreadCount , ( uint ) ( group . MessagesCount - index ) ) ;
1015
1015
}
1016
1016
}
1017
1017
ctx . SaveChanges ( ) ;
You can’t perform that action at this time.
0 commit comments