Skip to content

Commit

Permalink
fix: don't try to load next page on last page on Android
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed Mar 1, 2023
1 parent 9e195c8 commit 615d037
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions src/gui-qml/src/components/GalleryScreen.qml
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,11 @@ Page {
onOpenImage: mainStackView.push(imageScreen, { index: index })
onRefresh: galleryLoader.load()
onAppendNext: {
root.appendResults = true
root.page++
galleryLoader.load()
if (galleryLoader.hasNext) {
root.appendResults = true
root.page++
galleryLoader.load()
}
}
}

Expand Down
8 changes: 5 additions & 3 deletions src/gui-qml/src/components/SearchScreen.qml
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,11 @@ Page {
onOpenImage: mainStackView.push(imageScreen, { index: index })
onRefresh: load()
onAppendNext: {
searchTab.appendResults = true
searchTab.page++
searchTab.load()
if (pageLoader.hasNext) {
searchTab.appendResults = true
searchTab.page++
searchTab.load()
}
}
}

Expand Down

0 comments on commit 615d037

Please sign in to comment.