From aff0064b62c540176c1cd9cbd2a0a1c1d1314321 Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Thu, 30 Dec 2021 21:11:21 -0500 Subject: [PATCH] homescreen: Fix favourites strip swipe --- components/mobilehomescreencomponents/qml/HomeScreen.qml | 6 +++++- .../qml/appdrawer/AbstractAppDrawer.qml | 5 +++-- containments/homescreen/package/contents/ui/main.qml | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/components/mobilehomescreencomponents/qml/HomeScreen.qml b/components/mobilehomescreencomponents/qml/HomeScreen.qml index b1d08dcf..601d28de 100644 --- a/components/mobilehomescreencomponents/qml/HomeScreen.qml +++ b/components/mobilehomescreencomponents/qml/HomeScreen.qml @@ -42,7 +42,11 @@ Item { property alias appDrawer: appDrawerLoader.item property alias homeScreenContents: contents - Component.onCompleted: homeScreenState.goToPageIndex(0) + Component.onCompleted: { + // ensure that homescreen is on first page + homeScreenState.goToPageIndex(0); + homeScreenState.resetSwipeState(); + } // the parent of the homescreen is a flickable that captures all flicks FlickContainer { diff --git a/components/mobilehomescreencomponents/qml/appdrawer/AbstractAppDrawer.qml b/components/mobilehomescreencomponents/qml/appdrawer/AbstractAppDrawer.qml index 2bcb1229..54d0b8b5 100644 --- a/components/mobilehomescreencomponents/qml/appdrawer/AbstractAppDrawer.qml +++ b/components/mobilehomescreencomponents/qml/appdrawer/AbstractAppDrawer.qml @@ -119,8 +119,9 @@ Item { } // actual drawer - Controls.Control { - id: drawerFlickable + MobileShell.BaseItem { + visible: root.openFactor > 0 // prevent handlers from picking up events + Layout.fillWidth: true Layout.preferredHeight: root.height leftPadding: root.leftPadding; topPadding: root.topPadding diff --git a/containments/homescreen/package/contents/ui/main.qml b/containments/homescreen/package/contents/ui/main.qml index 5cb7d009..66540a4c 100644 --- a/containments/homescreen/package/contents/ui/main.qml +++ b/containments/homescreen/package/contents/ui/main.qml @@ -50,7 +50,7 @@ FocusScope { } function onResetHomeScreenPosition() { - homescreen.homeScreenState.goToPageIndex(0); + homescreen.homeScreenState.animateGoToPageIndex(0, PlasmaCore.Units.longDuration); homescreen.homeScreenState.closeAppDrawer(); }