更新代码

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

@@ -46,14 +46,15 @@ class CommentPagingSource(
postUser = postUser,
selfNotice = selfNotice,
order = order,
parentCommentId = parentCommentId
parentCommentId = parentCommentId,
pageSize = params.loadSize
)
LoadResult.Page(
data = comments.list,
prevKey = if (currentPage == 1) null else currentPage - 1,
nextKey = if (comments.list.isEmpty()) null else comments.page + 1
)
} catch (exception: IOException) {
} catch (exception: Exception) {
return LoadResult.Error(exception)
}
}