Skip to content

Commit

Permalink
fix: switch to actual infinite scroll on Android (issue #2884)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed Mar 1, 2023
1 parent 615d037 commit 383ffcb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/gui-qml/src/components/ResultsView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,20 @@ ScrollView {
onThumbnailFillModeChanged: resultsRefresher.restart()

Flickable {
// Pull to refresh and infinite scroll
// Pull to refresh
property bool atBeginningStart: false
property bool atEndStart: false
onFlickStarted: {
atBeginningStart = atYBeginning
atEndStart = atYEnd
}
onFlickEnded: {
if (atYBeginning && atBeginningStart) {
refresh()
}
if (atYEnd && atEndStart) {
}

// Infinite scroll
onAtYEndChanged: {
if (atYEnd) {
appendNext()
}
}
Expand Down

0 comments on commit 383ffcb

Please sign in to comment.