更新代码

This commit is contained in:
2024-09-14 23:27:44 +08:00
parent de5088dc02
commit 6247ade1dd
18 changed files with 785 additions and 366 deletions

View File

@@ -155,7 +155,8 @@ class CommentRemoteDataSource(
postUser: Int?,
selfNotice: Boolean?,
order: String?,
parentCommentId: Int?
parentCommentId: Int?,
pageSize: Int? = 20
): ListContainer<CommentEntity> {
return commentService.getComments(
pageNumber,
@@ -163,7 +164,8 @@ class CommentRemoteDataSource(
postUser = postUser,
selfNotice = selfNotice,
order = order,
parentCommentId = parentCommentId
parentCommentId = parentCommentId,
pageSize = pageSize
)
}
}

View File

@@ -29,7 +29,9 @@ data class Moment(
@SerializedName("commentCount")
val commentCount: Long,
@SerializedName("time")
val time: String
val time: String,
@SerializedName("isFollowed")
val isFollowed: Boolean,
) {
fun toMomentItem(): MomentEntity {
return MomentEntity(
@@ -38,7 +40,7 @@ data class Moment(
nickname = user.nickName,
location = "Worldwide",
time = ApiClient.dateFromApiString(time),
followStatus = false,
followStatus = isFollowed,
momentTextContent = textContent,
momentPicture = R.drawable.default_moment_img,
likeCount = likeCount.toInt(),