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

Commit b85215ff authored by arangelov's avatar arangelov Committed by Antoan Angelov
Browse files

Don't update height if recycler view was scrolled

Fixes: 159999176
Fixes: 159997845
Test: manual
Test: atest ChooserActivityTest
Change-Id: Ie867ee419b3595023195022b0f9f12e5da214938
parent 54b3e2a3
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2640,7 +2640,10 @@ public class ChooserActivity extends ResolverActivity implements
        }
        RecyclerView recyclerView = mChooserMultiProfilePagerAdapter.getActiveAdapterView();
        ChooserGridAdapter gridAdapter = mChooserMultiProfilePagerAdapter.getCurrentRootAdapter();
        if (gridAdapter == null || recyclerView == null) {
        // Skip height calculation if recycler view was scrolled to prevent it inaccurately
        // calculating the height, as the logic below does not account for the scrolled offset.
        if (gridAdapter == null || recyclerView == null
                || recyclerView.computeVerticalScrollOffset() != 0) {
            return;
        }