1
0
mirror of https://github.com/vector-im/riotX-android synced 2025-10-06 00:02:48 +02:00

Merge pull request #4846 from vector-im/feature/dla/fix-unread-message-indicator-no-messages

Fix unread messages indicator on room list if no messages
This commit is contained in:
Benoit Marty
2022-01-04 15:57:26 +01:00
committed by GitHub
2 changed files with 2 additions and 1 deletions

1
changelog.d/4749.bugfix Normal file
View File

@@ -0,0 +1 @@
Fix for broken unread message indicator on the room list when there are no messages in the room.

View File

@@ -136,7 +136,7 @@ internal class RoomSummaryUpdater @Inject constructor(
roomSummaryEntity.hasUnreadMessages = roomSummaryEntity.notificationCount > 0 ||
// avoid this call if we are sure there are unread events
!isEventRead(realm.configuration, userId, roomId, latestPreviewableEvent?.eventId)
latestPreviewableEvent?.let { !isEventRead(realm.configuration, userId, roomId, it.eventId) } ?: false
roomSummaryEntity.setDisplayName(roomDisplayNameResolver.resolve(realm, roomId))
roomSummaryEntity.avatarUrl = roomAvatarResolver.resolve(realm, roomId)