Update screenshots

This commit is contained in:
Florian Renaud
2023-04-12 16:48:00 +02:00
parent cf8e91c3cf
commit 5364bbd2cb
12 changed files with 33 additions and 17 deletions

View File

@@ -18,11 +18,21 @@ package io.element.android.features.createroom.impl.configureroom
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
import io.element.android.features.createroom.impl.CreateRoomConfig
import io.element.android.features.userlist.api.aListOfSelectedUsers
open class ConfigureRoomStateProvider : PreviewParameterProvider<ConfigureRoomState> {
override val values: Sequence<ConfigureRoomState>
get() = sequenceOf(
aConfigureRoomState(),
aConfigureRoomState().copy(
config = CreateRoomConfig(
roomName = "Room 101",
topic = "Room topic for this room when the text goes onto multiple lines and is really long, there shouldnt be more than 3 lines",
invites = aListOfSelectedUsers(),
privacy = RoomPrivacy.Private,
),
isCreateButtonEnabled = true,
),
)
}

View File

@@ -63,4 +63,4 @@ fun aUserListState() = UserListState(
eventSink = {}
)
fun aListOfSelectedUsers() = aMatrixUserList().take(4).toImmutableList()
fun aListOfSelectedUsers() = aMatrixUserList().take(6).toImmutableList()

View File

@@ -27,8 +27,8 @@ open class AvatarDataProvider : PreviewParameterProvider<AvatarData> {
)
}
fun anAvatarData() = AvatarData(
fun anAvatarData(id: String = "@id_of_alice:server.org", name: String = "Alice") = AvatarData(
// Let's the id not start with a 'a'.
id = "@id_of_alice:server.org",
name = "Alice",
id = id,
name = name,
)

View File

@@ -35,7 +35,7 @@ open class MatrixUserProvider : PreviewParameterProvider<MatrixUser> {
fun aMatrixUser(id: String = "@id_of_alice:server.org", userName: String = "Alice") = MatrixUser(
id = UserId(id),
username = userName,
avatarData = anAvatarData()
avatarData = anAvatarData(id, userName)
)
fun aMatrixUserList() = listOf(