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

Commit 30b63be1 authored by Adam Cohen's avatar Adam Cohen Committed by Android Git Automerger
Browse files

am 1226be43: Merge "Fix custom content scroll effects bug (recent regression)...

am 1226be43: Merge "Fix custom content scroll effects bug (recent regression) (issue 11188769)" into jb-ub-now-indigo-rose

* commit '1226be43':
  Fix custom content scroll effects bug (recent regression) (issue 11188769)
parents 8c9802ef 1226be43
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1431,11 +1431,11 @@ public class Workspace extends SmoothPagedView
        if (hasCustomContent()) {
            int index = mScreenOrder.indexOf(CUSTOM_CONTENT_SCREEN_ID);

            int scrollDelta = getScrollForPage(index + 1) - getScrollX() +
                    getLayoutTransitionOffsetForPage(index + 1);
            translationX = scrollDelta;
            progress = (1.0f * scrollDelta) /
                    (getScrollForPage(index + 1) - getScrollForPage(index));
            int scrollDelta = getScrollX() - getScrollForPage(index) -
                    getLayoutTransitionOffsetForPage(index);
            float scrollRange = getScrollForPage(index + 1) - getScrollForPage(index);
            translationX = scrollRange - scrollDelta;
            progress = (scrollRange - scrollDelta) / scrollRange;

            if (isLayoutRtl()) {
                translationX = Math.min(0, translationX);