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

Commit 9058a6c8 authored by Jean-Baptiste Queru's avatar Jean-Baptiste Queru Committed by Android Git Automerger
Browse files

am 7e683ec6: am fa42e774: Merge "FastScroller: Fix to use appropriate index"

* commit '7e683ec6':
  FastScroller: Fix to use appropriate index
parents 928e045f 7e683ec6
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -676,8 +676,13 @@ class FastScroller {

        final int section = mSectionIndexer.getSectionForPosition(firstVisibleItem);
        final int sectionPos = mSectionIndexer.getPositionForSection(section);
        final int nextSectionPos = mSectionIndexer.getPositionForSection(section + 1);
        final int nextSectionPos;
        final int sectionCount = mSections.length;
        if (section + 1 < sectionCount) {
            nextSectionPos = mSectionIndexer.getPositionForSection(section + 1);
        } else {
            nextSectionPos = totalItemCount - 1;
        }
        final int positionsInSection = nextSectionPos - sectionPos;

        final View child = mList.getChildAt(0);