homescreen: Fix favourites strip swipe

This commit is contained in:
Devin Lin 2021-12-30 21:11:21 -05:00
parent 3e8fa8f8e8
commit aff0064b62
3 changed files with 9 additions and 4 deletions

View file

@ -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 {

View file

@ -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

View file

@ -50,7 +50,7 @@ FocusScope {
}
function onResetHomeScreenPosition() {
homescreen.homeScreenState.goToPageIndex(0);
homescreen.homeScreenState.animateGoToPageIndex(0, PlasmaCore.Units.longDuration);
homescreen.homeScreenState.closeAppDrawer();
}