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.
This commit is contained in:
Devin Lin 2024-11-11 21:15:31 -08:00
parent c396555509
commit 238cf4948b

View file

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