Re-arrange components so as to better fit the ListOptionsButton.

This commit is contained in:
KotlinGeekDev
2025-04-25 14:20:24 +01:00
parent b52943a826
commit 0693e4412f
@@ -54,7 +54,6 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment 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
@@ -315,8 +314,14 @@ fun CustomListItem(
width = Dp.Hairline, width = Dp.Hairline,
color = Color.Gray, color = Color.Gray,
shape = RoundedCornerShape(percent = 20), shape = RoundedCornerShape(percent = 20),
).padding(all = 12.dp), ).padding(horizontal = 10.dp),
// verticalAlignment = Alignment.CenterVertically, ) {
Row(
modifier =
modifier
.padding(bottom = 12.dp)
.weight(1f),
verticalAlignment = Alignment.CenterVertically,
) { ) {
Column( Column(
modifier = modifier.weight(1f), modifier = modifier.weight(1f),
@@ -347,14 +352,10 @@ fun CustomListItem(
followSet.description ?: "", followSet.description ?: "",
fontWeight = FontWeight.Light, fontWeight = FontWeight.Light,
overflow = TextOverflow.Ellipsis, overflow = TextOverflow.Ellipsis,
maxLines = 3, maxLines = 2,
) )
} }
Row(
verticalAlignment = Alignment.Top,
horizontalArrangement = Arrangement.End,
) {
followSet.visibility.let { followSet.visibility.let {
val text by derivedStateOf { val text by derivedStateOf {
when (it) { when (it) {
@@ -382,15 +383,16 @@ fun CustomListItem(
Text(text, color = Color.Gray, fontWeight = FontWeight.Light) Text(text, color = Color.Gray, fontWeight = FontWeight.Light)
} }
} }
}
Column( Column(
modifier = modifier.padding(vertical = 7.dp),
verticalArrangement = Arrangement.Top, verticalArrangement = Arrangement.Top,
horizontalAlignment = Alignment.End, horizontalAlignment = Alignment.End,
) { ) {
ListOptionsButton(followSetName = followSet.title) ListOptionsButton(followSetName = followSet.title)
} }
} }
}
} }
@Composable @Composable