mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 02:15:35 +03:00
If latestPreviewableEvent is null we should return false(no messages in room).
This commit is contained in:
parent
5340d16e1f
commit
9f13a9df54
2 changed files with 2 additions and 1 deletions
1
changelog.d/4749.bugfix
Normal file
1
changelog.d/4749.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Fix for broken unread message indicator on the room list when there are no messages in the room.
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue