Skip to content
Snippets Groups Projects
Commit 80ea0147 authored by Geoffrey Métais's avatar Geoffrey Métais Committed by Nicolas Pomepuy
Browse files

FastScroller: performance improvement

(cherry picked from commit 9445e1ec)
parent 973f2537
No related branches found
No related tags found
No related merge requests found
......@@ -359,10 +359,12 @@ class FastScroller : LinearLayout, CoroutineScope, Observer<HeadersIndex> {
if (BuildConfig.DEBUG) Log.d(TAG, "findFirstVisibleItemPosition $position")
val pos = provider.getPositionForSection(position)
val sectionforPosition = provider.getSectionforPosition(pos)
sb.append(' ')
.append(sectionforPosition)
.append(' ')
if (!sectionforPosition.isEmpty()) bubble.text = sb.toString()
if (sectionforPosition.isNotEmpty()) bubble.text = withContext(Dispatchers.Default) {
sb.append(' ')
.append(sectionforPosition)
.append(' ')
.toString()
}
delay(100L)
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment