新增点击评论头像跳转到用户主页功能

This commit is contained in:
2024-09-01 23:22:12 +08:00
parent a4ab6f0ab7
commit 48b1b1fe51

View File

@@ -585,6 +585,7 @@ fun CommentsSection(
@Composable
fun CommentItem(commentEntity: CommentEntity, onLike: () -> Unit = {}) {
val context = LocalContext.current
val navController = LocalNavController.current
Column {
Row(modifier = Modifier.padding(vertical = 8.dp)) {
CustomAsyncImage(
@@ -593,7 +594,15 @@ fun CommentItem(commentEntity: CommentEntity, onLike: () -> Unit = {}) {
contentDescription = "Comment Profile Picture",
modifier = Modifier
.size(40.dp)
.clip(CircleShape),
.clip(CircleShape)
.noRippleClickable {
navController.navigate(
NavigationRoute.AccountProfile.route.replace(
"{id}",
commentEntity.author.toString()
)
)
},
contentScale = ContentScale.Crop
)
Spacer(modifier = Modifier.width(8.dp))