Skip to content

Commit

Permalink
Fix pagination and page
Browse files Browse the repository at this point in the history
  • Loading branch information
MV-GH committed Dec 18, 2023
1 parent 6b07a29 commit e356556
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ class LemmyApiService(
*
* @GET("post/list")
*/
override suspend fun getPosts(form: GetPosts): Result<GetPostsResponse> = ktor.getResult("post/list", form)
override suspend fun getPosts(form: GetPosts): Result<GetPostsResponse> = ktor.getResult("post/list",
form.copy(page = if (form.page_cursor != null) null else form.page)
)

/**
* Delete a post.
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ POM_DEVELOPER_URL=https://github.com/MV-GH

POM_ARTIFACT_ID=lemmy-api
GROUP=it.vercruysse.lemmyapi
VERSION_NAME=0.2.0-SNAPSHOT
VERSION_NAME=0.2.1-SNAPSHOT

0 comments on commit e356556

Please sign in to comment.