homescreen: Fix fast sequential flicks not opening the app drawer

Fixes https://invent.kde.org/plasma/plasma-mobile/-/issues/188
This commit is contained in:
Devin Lin 2022-05-26 21:40:34 -04:00
parent 7ecb92d3dd
commit 8f418a3ee1

View file

@ -60,6 +60,13 @@ QtObject {
onYPositionChanged: {
movingUp = yPosition > oldYPosition;
oldYPosition = yPosition;
// speed up the animation
if (currentSwipeState == HomeScreenState.SwipingAppDrawerVisibility && yPosition <= 0) {
root.currentView = HomeScreenState.AppDrawerBeginningView;
root.resetSwipeState();
openDrawerAnim.stop();
}
}
// yPosition when the homescreen pages are visible