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

FastScroller: performance improvement

parent 912af532
No related branches found
No related tags found
Loading
Pipeline #11227 passed with stage
in 5 minutes and 21 seconds
......@@ -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