更新代码

This commit is contained in:
2024-09-07 20:26:15 +08:00
parent 49aea88b0b
commit 03a4db8a4b
12 changed files with 370 additions and 63 deletions

View File

@@ -26,7 +26,8 @@ class CommentPagingSource(
private val remoteDataSource: CommentRemoteDataSource,
private val postId: Int? = null,
private val postUser: Int? = null,
private val selfNotice: Boolean? = null
private val selfNotice: Boolean? = null,
private val order: String? = null
) : PagingSource<Int, CommentEntity>() {
override suspend fun load(params: LoadParams<Int>): LoadResult<Int, CommentEntity> {
return try {
@@ -35,7 +36,8 @@ class CommentPagingSource(
pageNumber = currentPage,
postId = postId,
postUser = postUser,
selfNotice = selfNotice
selfNotice = selfNotice,
order = order
)
LoadResult.Page(
data = comments.list,