Merge pull request #2130 from element-hq/feature/bma/roomListBadge
Some rework on the codebase
This commit is contained in:
commit
c3538e500d
33 changed files with 147 additions and 169 deletions
|
|
@ -428,7 +428,7 @@ class RustMatrixClient(
|
|||
}
|
||||
}
|
||||
|
||||
override suspend fun loadUserAvatarURLString(): Result<String?> = withContext(sessionDispatcher) {
|
||||
override suspend fun loadUserAvatarUrl(): Result<String?> = withContext(sessionDispatcher) {
|
||||
runCatching {
|
||||
client.avatarUrl()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,13 +34,12 @@ class RoomSummaryDetailsFactory(private val roomMessageFactory: RoomMessageFacto
|
|||
name = roomInfo.name ?: roomInfo.id,
|
||||
canonicalAlias = roomInfo.canonicalAlias,
|
||||
isDirect = roomInfo.isDirect,
|
||||
avatarURLString = roomInfo.avatarUrl,
|
||||
avatarUrl = roomInfo.avatarUrl,
|
||||
unreadNotificationCount = roomInfo.notificationCount.toInt(),
|
||||
lastMessage = latestRoomMessage,
|
||||
lastMessageTimestamp = latestRoomMessage?.originServerTs,
|
||||
inviter = roomInfo.inviter?.let(RoomMemberMapper::map),
|
||||
notificationMode = roomInfo.userDefinedNotificationMode?.let(RoomNotificationSettingsMapper::mapMode),
|
||||
hasOngoingCall = roomInfo.hasRoomCall,
|
||||
userDefinedNotificationMode = roomInfo.userDefinedNotificationMode?.let(RoomNotificationSettingsMapper::mapMode),
|
||||
hasRoomCall = roomInfo.hasRoomCall,
|
||||
isDm = roomInfo.isDirect && roomInfo.activeMembersCount.toLong() == 2L,
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue