mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-23 18:15:22 +00:00
Fix some edge cases in fileDetails
This commit is contained in:
parent
fb68aaede6
commit
172f85ae4f
@ -38,6 +38,7 @@ import androidx.compose.ui.Alignment
|
|||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.layout.ContentScale
|
import androidx.compose.ui.layout.ContentScale
|
||||||
|
import androidx.compose.ui.layout.layout
|
||||||
import androidx.compose.ui.platform.ComposeView
|
import androidx.compose.ui.platform.ComposeView
|
||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
@ -360,14 +361,18 @@ fun PreviewMessageDetails(
|
|||||||
fun FileDetails(fileDetails: List<TitledText>) {
|
fun FileDetails(fileDetails: List<TitledText>) {
|
||||||
if (fileDetails.isEmpty()) return
|
if (fileDetails.isEmpty()) return
|
||||||
|
|
||||||
CellWithPaddingAndMargin {
|
CellWithPaddingAndMargin(padding = 0.dp) {
|
||||||
FlowRow(verticalArrangement = Arrangement.spacedBy(16.dp)) {
|
FlowRow(
|
||||||
|
modifier = Modifier.padding(vertical = 24.dp, horizontal = 12.dp),
|
||||||
|
verticalArrangement = Arrangement.spacedBy(16.dp)
|
||||||
|
) {
|
||||||
fileDetails.forEach {
|
fileDetails.forEach {
|
||||||
BoxWithConstraints {
|
BoxWithConstraints {
|
||||||
TitledText(
|
TitledText(
|
||||||
it,
|
it,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.widthIn(min = maxWidth.div(2))
|
.widthIn(min = maxWidth.div(2))
|
||||||
|
.padding(horizontal = 12.dp)
|
||||||
.width(IntrinsicSize.Max)
|
.width(IntrinsicSize.Max)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user