mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-25 19:05:56 +03:00
Always mark chats as unread if they have an unread count > 0
Fixes chats not being marked as unread that have a high non-message event amount. Change-Id: I441fd21c3719109db4f61bc88ef81c6db54be55c
This commit is contained in:
parent
30cd55d260
commit
4cd19ed7e8
1 changed files with 4 additions and 1 deletions
|
@ -146,16 +146,19 @@ internal class RoomSummaryUpdater @Inject constructor(
|
|||
}
|
||||
|
||||
roomSummaryEntity.hasUnreadMessages = roomSummaryEntity.notificationCount > 0 ||
|
||||
(roomSummaryEntity.unreadCount?.let { it > 0 } ?: false) ||
|
||||
// avoid this call if we are sure there are unread events
|
||||
!isEventRead(realm.configuration, userId, roomId, latestPreviewableEvent?.eventId)
|
||||
roomSummaryEntity.hasUnreadContentMessages = roomSummaryEntity.notificationCount > 0 ||
|
||||
(roomSummaryEntity.unreadCount?.let { it > 0 } ?: false) ||
|
||||
// avoid this call if we are sure there are unread events
|
||||
(latestPreviewableContentEvent != null &&
|
||||
!isEventRead(realm.configuration, userId, roomId, latestPreviewableContentEvent.eventId))
|
||||
roomSummaryEntity.hasUnreadOriginalContentMessages = roomSummaryEntity.notificationCount > 0 ||
|
||||
(roomSummaryEntity.unreadCount?.let { it > 0 } ?: false) ||
|
||||
// avoid this call if we are sure there are unread events
|
||||
(latestPreviewableOriginalContentEvent != null &&
|
||||
!isEventRead(realm.configuration, userId, roomId, latestPreviewableOriginalContentEvent.eventId))
|
||||
!isEventRead(realm.configuration, userId, roomId, latestPreviewableOriginalContentEvent.eventId))
|
||||
|
||||
roomSummaryEntity.displayName = roomDisplayNameResolver.resolve(realm, roomId)
|
||||
roomSummaryEntity.avatarUrl = roomAvatarResolver.resolve(realm, roomId)
|
||||
|
|
Loading…
Reference in a new issue