点赞列表显示评论点赞关联的动态
This commit is contained in:
@@ -132,6 +132,8 @@ data class NoticeComment(
|
||||
val replyComment: NoticeComment?,
|
||||
@SerializedName("postId")
|
||||
val postId: Int,
|
||||
@SerializedName("post")
|
||||
val post: NoticePost?,
|
||||
) {
|
||||
fun toNoticeCommentEntity(): NoticeCommentEntity {
|
||||
return NoticeCommentEntity(
|
||||
@@ -139,7 +141,8 @@ data class NoticeComment(
|
||||
content = content,
|
||||
postId = postId,
|
||||
time = ApiClient.dateFromApiString(time),
|
||||
replyComment = replyComment?.toNoticeCommentEntity()
|
||||
replyComment = replyComment?.toNoticeCommentEntity(),
|
||||
post = post?.toNoticePostEntity()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,6 +88,8 @@ data class NoticeCommentEntity(
|
||||
val replyComment: NoticeCommentEntity?,
|
||||
// 动态
|
||||
val postId: Int,
|
||||
// 动态
|
||||
val post : NoticePostEntity?,
|
||||
)
|
||||
|
||||
/**
|
||||
|
||||
@@ -199,11 +199,11 @@ fun LikeCommentNoticeItem(
|
||||
initImagePagerIndex = 0
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
) {
|
||||
Row {
|
||||
Column(
|
||||
|
||||
modifier = Modifier.weight(1f)
|
||||
) {
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
@@ -268,9 +268,31 @@ fun LikeCommentNoticeItem(
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
Spacer(modifier = Modifier.width(16.dp))
|
||||
if (item.comment?.replyComment?.post != null) {
|
||||
item.comment.replyComment.post.let {
|
||||
CustomAsyncImage(
|
||||
context = context,
|
||||
imageUrl = it.images[0].thumbnail,
|
||||
contentDescription = "Post Thumbnail",
|
||||
modifier = Modifier.size(48.dp),
|
||||
contentScale = ContentScale.Crop
|
||||
)
|
||||
}
|
||||
} else {
|
||||
item.comment?.post?.let {
|
||||
CustomAsyncImage(
|
||||
context = context,
|
||||
imageUrl = it.images[0].thumbnail,
|
||||
contentDescription = "Post Thumbnail",
|
||||
modifier = Modifier.size(48.dp),
|
||||
contentScale = ContentScale.Crop
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user