homescreen: Fix swipe down gesture conflict with taskpanel

This commit is contained in:
Devin Lin 2021-12-26 00:21:42 -05:00
parent 54f10f9f13
commit 7a1a32724b

View file

@ -52,6 +52,9 @@ DragHandler {
}
if (__scrollDirection !== DragGestureHandler.Left && __scrollDirection !== DragGestureHandler.Right) {
// ensure it does not conflict with task switcher
if (!MobileShell.HomeScreenControls.taskSwitcher.visible) {
// if swipe up, scroll app drawer
root.appDrawer.flickable.contentY = Math.min(root.appDrawer.drawerTopMargin, Math.max(0, -translation.y));
@ -68,6 +71,7 @@ DragHandler {
}
}
}
}
if (__scrollDirection !== DragGestureHandler.Vertical) {
let newContentX = Math.min((mainFlickable.width * mainFlickable.totalPages) - mainFlickable.width, Math.max(0, __initialMainFlickableX - translation.x));