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

Commit 2da0a053 authored by Adam Cohen's avatar Adam Cohen
Browse files

Fix small scrolling regression

-> only cancel scrolling when necessary to avoid
   unnecessary snapToDestination() calls

Change-Id: I406bef2453c88d61d25f66be67205ab8fbd69ec9
parent a1648449
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1368,10 +1368,13 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
                 */
                final int xDist = Math.abs(mScroller.getFinalX() - mScroller.getCurrX());
                final boolean finishedScrolling = (mScroller.isFinished() || xDist < mTouchSlop);

                if (finishedScrolling) {
                    mTouchState = TOUCH_STATE_REST;
                    if (!mScroller.isFinished()) {
                        mScrollAbortedFromIntercept = true;
                        abortScrollerAnimation(false);
                    }
                } else {
                    if (isTouchPointInViewportWithBuffer((int) mDownMotionX, (int) mDownMotionY)) {
                        mTouchState = TOUCH_STATE_SCROLLING;