Improve layout of inviter in RoomJoinView.
This commit is contained in:
parent
9c0d1cfdeb
commit
01f9028123
2 changed files with 8 additions and 5 deletions
|
|
@ -55,7 +55,10 @@ open class JoinRoomStateProvider : PreviewParameterProvider<JoinRoomState> {
|
||||||
contentState = aLoadedContentState(joinAuthorisationStatus = JoinAuthorisationStatus.IsInvited(null))
|
contentState = aLoadedContentState(joinAuthorisationStatus = JoinAuthorisationStatus.IsInvited(null))
|
||||||
),
|
),
|
||||||
aJoinRoomState(
|
aJoinRoomState(
|
||||||
contentState = aLoadedContentState(joinAuthorisationStatus = JoinAuthorisationStatus.IsInvited(anInviteSender()))
|
contentState = aLoadedContentState(
|
||||||
|
numberOfMembers = 123,
|
||||||
|
joinAuthorisationStatus = JoinAuthorisationStatus.IsInvited(anInviteSender()),
|
||||||
|
)
|
||||||
),
|
),
|
||||||
aJoinRoomState(
|
aJoinRoomState(
|
||||||
contentState = aFailureContentState()
|
contentState = aFailureContentState()
|
||||||
|
|
|
||||||
|
|
@ -162,20 +162,20 @@ private fun JoinRoomContent(
|
||||||
RoomPreviewTitleAtom(contentState.computedTitle)
|
RoomPreviewTitleAtom(contentState.computedTitle)
|
||||||
},
|
},
|
||||||
subtitle = {
|
subtitle = {
|
||||||
|
RoomPreviewSubtitleAtom(contentState.computedSubtitle)
|
||||||
|
},
|
||||||
|
description = {
|
||||||
Column(
|
Column(
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
verticalArrangement = Arrangement.spacedBy(8.dp),
|
verticalArrangement = Arrangement.spacedBy(8.dp),
|
||||||
) {
|
) {
|
||||||
RoomPreviewSubtitleAtom(contentState.computedSubtitle)
|
|
||||||
val inviteSender = (contentState.joinAuthorisationStatus as? JoinAuthorisationStatus.IsInvited)?.inviteSender
|
val inviteSender = (contentState.joinAuthorisationStatus as? JoinAuthorisationStatus.IsInvited)?.inviteSender
|
||||||
if (inviteSender != null) {
|
if (inviteSender != null) {
|
||||||
InviteSenderView(inviteSender = inviteSender)
|
InviteSenderView(inviteSender = inviteSender)
|
||||||
}
|
}
|
||||||
|
RoomPreviewDescriptionAtom(contentState.topic ?: "")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
description = {
|
|
||||||
RoomPreviewDescriptionAtom(contentState.topic ?: "")
|
|
||||||
},
|
|
||||||
memberCount = {
|
memberCount = {
|
||||||
if (contentState.showMemberCount) {
|
if (contentState.showMemberCount) {
|
||||||
RoomPreviewMembersCountMolecule(memberCount = contentState.numberOfMembers ?: 0)
|
RoomPreviewMembersCountMolecule(memberCount = contentState.numberOfMembers ?: 0)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue