Remove useless (?) Column.
This commit is contained in:
parent
dc6a65a8db
commit
35fbdff907
1 changed files with 48 additions and 53 deletions
|
|
@ -192,72 +192,67 @@ fun RoomListContent(
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
content = { padding ->
|
content = { padding ->
|
||||||
Column(
|
LazyColumn(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(padding)
|
.padding(padding)
|
||||||
.consumeWindowInsets(padding)
|
.consumeWindowInsets(padding)
|
||||||
|
.nestedScroll(nestedScrollConnection),
|
||||||
|
state = lazyListState,
|
||||||
) {
|
) {
|
||||||
LazyColumn(
|
if (state.displayVerificationPrompt) {
|
||||||
modifier = Modifier
|
item {
|
||||||
.weight(1f)
|
RequestVerificationHeader(
|
||||||
.nestedScroll(nestedScrollConnection),
|
onVerifyClicked = onVerifyClicked,
|
||||||
state = lazyListState,
|
onDismissClicked = { state.eventSink(RoomListEvents.DismissRequestVerificationPrompt) }
|
||||||
) {
|
)
|
||||||
if (state.displayVerificationPrompt) {
|
|
||||||
item {
|
|
||||||
RequestVerificationHeader(
|
|
||||||
onVerifyClicked = onVerifyClicked,
|
|
||||||
onDismissClicked = { state.eventSink(RoomListEvents.DismissRequestVerificationPrompt) }
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (state.invitesState != InvitesState.NoInvites) {
|
if (state.invitesState != InvitesState.NoInvites) {
|
||||||
item {
|
item {
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
|
) {
|
||||||
|
Row(
|
||||||
|
modifier = Modifier
|
||||||
|
.clickable(role = Role.Button, onClick = onInvitesClicked)
|
||||||
|
.padding(horizontal = 16.dp)
|
||||||
|
.align(Alignment.CenterEnd)
|
||||||
|
.heightIn(min = 48.dp),
|
||||||
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
) {
|
) {
|
||||||
Row(
|
Text(
|
||||||
modifier = Modifier
|
text = stringResource(CommonStrings.action_invites_list),
|
||||||
.clickable(role = Role.Button, onClick = onInvitesClicked)
|
fontSize = 14.sp,
|
||||||
.padding(horizontal = 16.dp)
|
style = noFontPadding,
|
||||||
.align(Alignment.CenterEnd)
|
)
|
||||||
.heightIn(min = 48.dp),
|
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
if (state.invitesState == InvitesState.NewInvites) {
|
||||||
) {
|
Spacer(Modifier.width(8.dp))
|
||||||
Text(
|
|
||||||
text = stringResource(CommonStrings.action_invites_list),
|
Box(
|
||||||
fontSize = 14.sp,
|
modifier = Modifier
|
||||||
style = noFontPadding,
|
.size(12.dp)
|
||||||
|
.clip(CircleShape)
|
||||||
|
.background(MaterialTheme.roomListUnreadIndicator())
|
||||||
)
|
)
|
||||||
|
|
||||||
if (state.invitesState == InvitesState.NewInvites) {
|
|
||||||
Spacer(Modifier.width(8.dp))
|
|
||||||
|
|
||||||
Box(
|
|
||||||
modifier = Modifier
|
|
||||||
.size(12.dp)
|
|
||||||
.clip(CircleShape)
|
|
||||||
.background(MaterialTheme.roomListUnreadIndicator())
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
itemsIndexed(
|
itemsIndexed(
|
||||||
items = state.roomList,
|
items = state.roomList,
|
||||||
contentType = { _, room -> room.contentType() },
|
contentType = { _, room -> room.contentType() },
|
||||||
) { index, room ->
|
) { index, room ->
|
||||||
RoomSummaryRow(
|
RoomSummaryRow(
|
||||||
room = room,
|
room = room,
|
||||||
onClick = ::onRoomClicked,
|
onClick = ::onRoomClicked,
|
||||||
onLongClick = onRoomLongClicked,
|
onLongClick = onRoomLongClicked,
|
||||||
)
|
)
|
||||||
if (index != state.roomList.lastIndex) {
|
if (index != state.roomList.lastIndex) {
|
||||||
Divider()
|
Divider()
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue