Use new Rust fields numUnreadMessages and numUnreadMentions, and iterate on the room badge rendering.

This commit is contained in:
Benoit Marty 2024-01-19 17:48:26 +01:00 committed by Benoit Marty
parent bee56c83ae
commit dd12071ea2
12 changed files with 159 additions and 62 deletions

View file

@ -35,7 +35,8 @@ class RoomSummaryDetailsFactory(private val roomMessageFactory: RoomMessageFacto
canonicalAlias = roomInfo.canonicalAlias,
isDirect = roomInfo.isDirect,
avatarUrl = roomInfo.avatarUrl,
unreadNotificationCount = roomInfo.notificationCount.toInt(),
numUnreadMentions = roomInfo.numUnreadMentions.toInt(),
numUnreadMessages = roomInfo.numUnreadMessages.toInt(),
lastMessage = latestRoomMessage,
inviter = roomInfo.inviter?.let(RoomMemberMapper::map),
userDefinedNotificationMode = roomInfo.userDefinedNotificationMode?.let(RoomNotificationSettingsMapper::mapMode),