mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Create extension RoomSummaryDetails.getAvatarData to avoid code duplication.
This commit is contained in:
+1
-6
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user