更新评论布局

This commit is contained in:
2024-08-28 17:21:43 +08:00
parent 0837c4ffa0
commit 101d164658

View File

@@ -597,13 +597,16 @@ fun CommentItem(commentEntity: CommentEntity, onLike: () -> Unit = {}) {
contentScale = ContentScale.Crop contentScale = ContentScale.Crop
) )
Spacer(modifier = Modifier.width(8.dp)) Spacer(modifier = Modifier.width(8.dp))
Column { Column(
modifier = Modifier.weight(1f)
) {
Text(text = commentEntity.name, fontWeight = FontWeight.Bold) Text(text = commentEntity.name, fontWeight = FontWeight.Bold)
Text(text = commentEntity.comment) Text(text = commentEntity.comment)
Text(text = commentEntity.date.timeAgo(), fontSize = 12.sp, color = Color.Gray) Text(text = commentEntity.date.timeAgo(), fontSize = 12.sp, color = Color.Gray)
} }
Spacer(modifier = Modifier.weight(1f)) Column(
Column(horizontalAlignment = Alignment.CenterHorizontally) { modifier = Modifier.width(64.dp),
horizontalAlignment = Alignment.CenterHorizontally) {
IconButton(onClick = { IconButton(onClick = {
onLike() onLike()
}) { }) {