ConversationListScreen: Fix clipping for list cell
This commit is contained in:
@@ -131,9 +131,10 @@ fun ConversationListItem(
|
|||||||
style = TextStyle(fontSize = 18.sp, fontWeight = FontWeight.Bold),
|
style = TextStyle(fontSize = 18.sp, fontWeight = FontWeight.Bold),
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
|
modifier = Modifier.weight(1f, fill = true)
|
||||||
)
|
)
|
||||||
|
|
||||||
Spacer(Modifier.weight(1f))
|
Spacer(modifier = Modifier)
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
formatDateTime(
|
formatDateTime(
|
||||||
@@ -141,9 +142,11 @@ fun ConversationListItem(
|
|||||||
.atZone(ZoneId.systemDefault())
|
.atZone(ZoneId.systemDefault())
|
||||||
.toLocalDateTime()
|
.toLocalDateTime()
|
||||||
),
|
),
|
||||||
modifier = Modifier.align(Alignment.CenterVertically),
|
|
||||||
color = MaterialTheme.colors.onBackground.copy(alpha = 0.4f),
|
color = MaterialTheme.colors.onBackground.copy(alpha = 0.4f),
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
|
modifier = Modifier
|
||||||
|
.align(Alignment.CenterVertically)
|
||||||
|
,
|
||||||
)
|
)
|
||||||
|
|
||||||
Spacer(Modifier.width(horizontalPadding))
|
Spacer(Modifier.width(horizontalPadding))
|
||||||
@@ -175,7 +178,7 @@ fun UnreadIndicator(size: Dp, modifier: Modifier = Modifier) {
|
|||||||
@Composable
|
@Composable
|
||||||
fun ConversationListItemPreview() {
|
fun ConversationListItemPreview() {
|
||||||
Column(modifier = Modifier.background(MaterialTheme.colors.background)) {
|
Column(modifier = Modifier.background(MaterialTheme.colors.background)) {
|
||||||
ConversationListItem(name = "James MagahernMagahernMagahernMagahernMagahernMagahernMagahern", id = "asdf", lastMessagePreview = "This is a test", date = Date(), isUnread = true) {}
|
ConversationListItem(name = "James Magahern", id = "asdf", lastMessagePreview = "This is a test", date = Date(), isUnread = true) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user