From 238cf4948b876ae41d33b1420736c9567f30f493 Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Mon, 11 Nov 2024 21:15:31 -0800 Subject: [PATCH] actioncenter: Allow expanded mode to be opened as soon as minimized offset crossed Currently the user can only expand to the expanded state after the initial minimized animation finishes. This animation gets reset as soon as a finger is pressed down, causing the user to have to wait until the animation completely finishes before being able to go to the expanded state. Bypass the need to wait for the animation to finish by setting the open state immediately if the offset already is past the minimized threshold. --- components/mobileshell/qml/actiondrawer/ActionDrawer.qml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/mobileshell/qml/actiondrawer/ActionDrawer.qml b/components/mobileshell/qml/actiondrawer/ActionDrawer.qml index dcf43fec..51e21573 100644 --- a/components/mobileshell/qml/actiondrawer/ActionDrawer.qml +++ b/components/mobileshell/qml/actiondrawer/ActionDrawer.qml @@ -202,7 +202,6 @@ Item { // go back to pinned, or close if pinned mode is disabled openToPinnedMode ? open() : close(); } - } else if (root.direction === MobileShell.Direction.Down) { // if drag is between pinned view and open view, and dragging down open(); @@ -276,6 +275,12 @@ Item { function startSwipe() { root.cancelAnimations(); root.dragging = true; + + // Immediately open action drawer if we interact with it and it's already open + // This allows us to have 2 quick flicks from minimized -> expanded + if (root.visible && !root.opened) { + root.opened = true; + } } function endSwipe() {