Create extension RoomSummaryDetails.getAvatarData to avoid code duplication.
This commit is contained in:
parent
33c76dfd2d
commit
7d0323d708
5 changed files with 32 additions and 28 deletions
|
|
@ -64,12 +64,7 @@ class RoomListRoomSummaryFactory @Inject constructor(
|
|||
|
||||
fun create(roomSummary: RoomSummary.Filled): RoomListRoomSummary {
|
||||
val roomIdentifier = roomSummary.identifier()
|
||||
val avatarData = AvatarData(
|
||||
id = roomIdentifier,
|
||||
name = roomSummary.details.name,
|
||||
url = roomSummary.details.avatarUrl,
|
||||
size = AvatarSize.RoomListItem,
|
||||
)
|
||||
val avatarData = roomSummary.details.getAvatarData(size = AvatarSize.RoomListItem)
|
||||
return RoomListRoomSummary(
|
||||
id = roomIdentifier,
|
||||
roomId = RoomId(roomIdentifier),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue