From 6d41f67c755d431c5e8349fcd6e33a76f6c472ff Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 18 Apr 2024 15:50:51 +0200 Subject: [PATCH] Improve layout of inviter in RoomJoinView. --- .../features/joinroom/impl/JoinRoomStateProvider.kt | 5 ++++- .../android/features/joinroom/impl/JoinRoomView.kt | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) 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 9fec1683be..9afd4dd797 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 @@ -55,7 +55,10 @@ open class JoinRoomStateProvider : PreviewParameterProvider { contentState = aLoadedContentState(joinAuthorisationStatus = JoinAuthorisationStatus.IsInvited(null)) ), aJoinRoomState( - contentState = aLoadedContentState(joinAuthorisationStatus = JoinAuthorisationStatus.IsInvited(anInviteSender())) + contentState = aLoadedContentState( + numberOfMembers = 123, + joinAuthorisationStatus = JoinAuthorisationStatus.IsInvited(anInviteSender()), + ) ), aJoinRoomState( contentState = aFailureContentState() diff --git a/features/joinroom/impl/src/main/kotlin/io/element/android/features/joinroom/impl/JoinRoomView.kt b/features/joinroom/impl/src/main/kotlin/io/element/android/features/joinroom/impl/JoinRoomView.kt index f0e947014a..567a63025d 100644 --- a/features/joinroom/impl/src/main/kotlin/io/element/android/features/joinroom/impl/JoinRoomView.kt +++ b/features/joinroom/impl/src/main/kotlin/io/element/android/features/joinroom/impl/JoinRoomView.kt @@ -162,20 +162,20 @@ private fun JoinRoomContent( RoomPreviewTitleAtom(contentState.computedTitle) }, subtitle = { + RoomPreviewSubtitleAtom(contentState.computedSubtitle) + }, + description = { Column( horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(8.dp), ) { - RoomPreviewSubtitleAtom(contentState.computedSubtitle) val inviteSender = (contentState.joinAuthorisationStatus as? JoinAuthorisationStatus.IsInvited)?.inviteSender if (inviteSender != null) { InviteSenderView(inviteSender = inviteSender) } + RoomPreviewDescriptionAtom(contentState.topic ?: "") } }, - description = { - RoomPreviewDescriptionAtom(contentState.topic ?: "") - }, memberCount = { if (contentState.showMemberCount) { RoomPreviewMembersCountMolecule(memberCount = contentState.numberOfMembers ?: 0)