Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ac9e9a3c authored by Jordan Demeulenaere's avatar Jordan Demeulenaere
Browse files

Immediately stop bouncing transitions if the overscroll is empty

This CL immediately stops the overscrolling of a transition if the
overscroll spec is empty. This allows transitions to finish immediately
as soon as there won't be any visual effect during overscroll.

See b/327249191#comment10 for before/after videos.

Bug: 327249191
Test: In the STL demo app, select the VeryBouncy config and perform the
 Shade => Lockscreen/Shade transitions.
Flag: N/A
Change-Id: Ie5b5a93d7cbaebc647cb00f38455423332d8e395
parent d739277b
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -682,6 +682,17 @@ private class SwipeTransition(
                                        }
                                    if (isBouncing) {
                                        bouncingScene = targetScene

                                        // Immediately stop this transition if we are bouncing on a
                                        // scene that does not bounce.
                                        val overscrollSpec = currentOverscrollSpec
                                        if (
                                            overscrollSpec != null &&
                                                overscrollSpec.transformationSpec.transformations
                                                    .isEmpty()
                                        ) {
                                            snapToScene(targetScene)
                                        }
                                    }
                                }
                            }