Commit 81123872 authored by Devin Lin's avatar Devin Lin 🎨
Browse files

homescreens/halcyon: Prevent search widget from being opened from dragging down and up

parent 32bd414b
Pipeline #202399 passed with stage
in 1 minute and 8 seconds
......@@ -30,10 +30,11 @@ MobileShell.GridView {
// search widget open gesture
property bool openingSearchWidget: false
property bool canOpenSearchWidget: false
property real oldVerticalOvershoot: verticalOvershoot
onVerticalOvershootChanged: {
if (dragging && verticalOvershoot < 0) {
if (dragging && canOpenSearchWidget && verticalOvershoot < 0) {
if (!openingSearchWidget) {
if (oldVerticalOvershoot === 0) {
openingSearchWidget = true;
......@@ -47,7 +48,9 @@ MobileShell.GridView {
oldVerticalOvershoot = verticalOvershoot;
}
onDraggingChanged: {
if (!dragging && openingSearchWidget) {
if (dragging) {
canOpenSearchWidget = root.contentY <= 0;
} else if (!dragging && openingSearchWidget) {
openingSearchWidget = false;
root.searchWidget.endGesture();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment