More cleanup
This commit is contained in:
@@ -50,6 +50,7 @@ import io.element.android.libraries.matrix.ui.components.aMatrixUserList
|
||||
import io.element.android.libraries.matrix.ui.model.getAvatarData
|
||||
import io.element.android.libraries.ui.strings.CommonStrings
|
||||
import kotlinx.collections.immutable.ImmutableList
|
||||
import kotlinx.collections.immutable.persistentListOf
|
||||
import kotlinx.collections.immutable.toImmutableList
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@@ -164,14 +165,14 @@ internal fun MessagesViewTopBarPreview() = ElementPreview {
|
||||
size = AvatarSize.TimelineRoom,
|
||||
),
|
||||
isTombstoned: Boolean = false,
|
||||
heroes: List<AvatarData> = emptyList(),
|
||||
heroes: ImmutableList<AvatarData> = persistentListOf(),
|
||||
roomCallState: RoomCallState = RoomCallState.Unavailable,
|
||||
dmUserIdentityState: IdentityState? = null,
|
||||
) = MessagesViewTopBar(
|
||||
roomName = roomName,
|
||||
roomAvatar = roomAvatar,
|
||||
isTombstoned = isTombstoned,
|
||||
heroes = heroes.toImmutableList(),
|
||||
heroes = heroes,
|
||||
roomCallState = roomCallState,
|
||||
dmUserIdentityState = dmUserIdentityState,
|
||||
onRoomDetailsClick = {},
|
||||
@@ -182,7 +183,7 @@ internal fun MessagesViewTopBarPreview() = ElementPreview {
|
||||
AMessagesViewTopBar()
|
||||
HorizontalDivider()
|
||||
AMessagesViewTopBar(
|
||||
heroes = aMatrixUserList().map { it.getAvatarData(AvatarSize.TimelineRoom) },
|
||||
heroes = aMatrixUserList().map { it.getAvatarData(AvatarSize.TimelineRoom) }.toImmutableList(),
|
||||
roomCallState = anOngoingCallState(),
|
||||
)
|
||||
HorizontalDivider()
|
||||
|
||||
@@ -37,6 +37,7 @@ import io.element.android.libraries.matrix.ui.components.aMatrixUserList
|
||||
import io.element.android.libraries.matrix.ui.model.getAvatarData
|
||||
import io.element.android.libraries.ui.strings.CommonStrings
|
||||
import kotlinx.collections.immutable.ImmutableList
|
||||
import kotlinx.collections.immutable.persistentListOf
|
||||
import kotlinx.collections.immutable.toImmutableList
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@@ -100,12 +101,12 @@ internal fun ThreadTopBarPreview() = ElementPreview {
|
||||
size = AvatarSize.TimelineRoom,
|
||||
),
|
||||
isTombstoned: Boolean = false,
|
||||
heroes: List<AvatarData> = emptyList(),
|
||||
heroes: ImmutableList<AvatarData> = persistentListOf(),
|
||||
) = ThreadTopBar(
|
||||
roomName = roomName,
|
||||
roomAvatarData = roomAvatarData,
|
||||
isTombstoned = isTombstoned,
|
||||
heroes = heroes.toImmutableList(),
|
||||
heroes = heroes,
|
||||
onBackClick = {},
|
||||
)
|
||||
Column {
|
||||
|
||||
Reference in New Issue
Block a user