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

Commit f183b36c authored by fbaron's avatar fbaron
Browse files

Fix pagination animation when removing a page

Flag: NONE
Test: verified on device
Fix: 323384413
Change-Id: I43443f815990df4014b4cfad05f68a445d44a5f4
parent ac7c1e37
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -365,6 +365,13 @@ public class PageIndicatorDots extends View implements Insettable, PageIndicator
    @Override
    public void setMarkersCount(int numMarkers) {
        mNumPages = numMarkers;

        // If the last page gets removed we want to go to the previous page.
        if (mNumPages == mActivePage) {
            mActivePage--;
            CURRENT_POSITION.set(this, (float) mActivePage);
        }

        requestLayout();
    }