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

Commit 26f00b0b authored by Caio Schnepper's avatar Caio Schnepper Committed by Nir Bruderman
Browse files

Gallery2: Fix RTL album picking

The gallery picks the albums in inverted side while using RTL languages, this makes it correctly open the choosen album

Change-Id: I9e944731515514f00838c62b72900442461d4014
(cherry picked from commit 073d9495)
parent 95a27a8e
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -625,12 +625,6 @@ public class SlotView extends GLView {
        public int getSlotIndexByPosition(float x, float y) {
            int absoluteX = Math.round(x) + (mIsWide ? mScrollPosition : 0);
            int absoluteY = Math.round(y) + (mIsWide ? 0 : mScrollPosition);
            if (View.LAYOUT_DIRECTION_RTL == TextUtils
                    .getLayoutDirectionFromLocale(Locale.getDefault())) {
                // If RTL, recalculate the absoluteX.
                absoluteX = mContentLength > mWidth ? (mContentLength - absoluteX) : mWidth
                        - absoluteX;
            }
            absoluteX -= mHorizontalPadding.get();
            absoluteY -= mVerticalPadding.get();