From b175c2d2c3f7276abbcf124563b577d93d6b8268 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 24 Apr 2024 16:36:10 +0200 Subject: [PATCH] Add a preview with the minimum available data. --- .../features/joinroom/impl/JoinRoomStateProvider.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/features/joinroom/impl/src/main/kotlin/io/element/android/features/joinroom/impl/JoinRoomStateProvider.kt b/features/joinroom/impl/src/main/kotlin/io/element/android/features/joinroom/impl/JoinRoomStateProvider.kt index 7c4cb2ea7d..615e264483 100644 --- a/features/joinroom/impl/src/main/kotlin/io/element/android/features/joinroom/impl/JoinRoomStateProvider.kt +++ b/features/joinroom/impl/src/main/kotlin/io/element/android/features/joinroom/impl/JoinRoomStateProvider.kt @@ -39,6 +39,13 @@ open class JoinRoomStateProvider : PreviewParameterProvider { aJoinRoomState( contentState = anUnknownContentState() ), + aJoinRoomState( + contentState = aLoadedContentState( + name = null, + alias = null, + topic = null, + ) + ), aJoinRoomState( contentState = aLoadedContentState(joinAuthorisationStatus = JoinAuthorisationStatus.CanJoin) ), @@ -86,7 +93,7 @@ fun aLoadingContentState(roomId: RoomId = A_ROOM_ID) = ContentState.Loading(room fun aLoadedContentState( roomId: RoomId = A_ROOM_ID, - name: String = "Element X android", + name: String? = "Element X android", alias: RoomAlias? = RoomAlias("#exa:matrix.org"), topic: String? = "Element X is a secure, private and decentralized messenger.", numberOfMembers: Long? = null,