Reduce number of changes in preview.
This commit is contained in:
parent
331583c60f
commit
cd1b56bb26
7 changed files with 9 additions and 31 deletions
|
|
@ -18,17 +18,16 @@ class SpaceRoomProvider : PreviewParameterProvider<SpaceRoom> {
|
|||
override val values: Sequence<SpaceRoom> = sequenceOf(
|
||||
aSpaceRoom(
|
||||
roomType = RoomType.Room,
|
||||
rawName = "Room name with topic",
|
||||
displayName = "Room name with topic",
|
||||
topic = "Room topic that is quite long and might be truncated"
|
||||
),
|
||||
aSpaceRoom(
|
||||
roomType = RoomType.Room,
|
||||
rawName = "Room name no topic",
|
||||
displayName = "Room name no topic",
|
||||
state = CurrentUserMembership.LEFT,
|
||||
),
|
||||
aSpaceRoom(
|
||||
roomType = RoomType.Room,
|
||||
rawName = null,
|
||||
isDirect = true,
|
||||
heroes = listOf(aMatrixUser(displayName = "Alice")),
|
||||
state = CurrentUserMembership.JOINED,
|
||||
|
|
@ -36,13 +35,13 @@ class SpaceRoomProvider : PreviewParameterProvider<SpaceRoom> {
|
|||
),
|
||||
aSpaceRoom(
|
||||
roomType = RoomType.Room,
|
||||
rawName = "Room name with topic",
|
||||
displayName = "Room name with topic",
|
||||
topic = "Room topic that is quite long and might be truncated",
|
||||
state = CurrentUserMembership.INVITED,
|
||||
),
|
||||
aSpaceRoom(
|
||||
roomType = RoomType.Room,
|
||||
rawName = "Room name no topic",
|
||||
displayName = "Room name no topic",
|
||||
state = CurrentUserMembership.INVITED,
|
||||
),
|
||||
aSpaceRoom(
|
||||
|
|
@ -60,7 +59,6 @@ class SpaceRoomProvider : PreviewParameterProvider<SpaceRoom> {
|
|||
state = CurrentUserMembership.LEFT,
|
||||
),
|
||||
aSpaceRoom(
|
||||
rawName = null,
|
||||
numJoinedMembers = 5,
|
||||
childrenCount = 10,
|
||||
worldReadable = true,
|
||||
|
|
@ -68,14 +66,5 @@ class SpaceRoomProvider : PreviewParameterProvider<SpaceRoom> {
|
|||
roomId = RoomId("!spaceId2:example.com"),
|
||||
state = CurrentUserMembership.INVITED,
|
||||
),
|
||||
aSpaceRoom(
|
||||
rawName = null,
|
||||
numJoinedMembers = 5,
|
||||
childrenCount = 10,
|
||||
worldReadable = true,
|
||||
avatarUrl = "anUrl",
|
||||
roomId = RoomId("!spaceId3:example.com"),
|
||||
state = CurrentUserMembership.INVITED,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import io.element.android.libraries.matrix.api.spaces.SpaceRoom
|
|||
import io.element.android.libraries.matrix.api.user.MatrixUser
|
||||
|
||||
fun aSpaceRoom(
|
||||
rawName: String? = "Space name",
|
||||
rawName: String? = null,
|
||||
displayName: String = "Space name",
|
||||
avatarUrl: String? = null,
|
||||
canonicalAlias: RoomAlias? = null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue