avoid showing empty fastscroller bubble if the current item is a section

This commit is contained in:
tibbi 2018-06-22 21:18:39 +02:00
parent 8e1cd62c7c
commit cd79467ff6

View file

@ -358,7 +358,14 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
}
}
private fun getBubbleTextItem(index: Int, sorting: Int) = getMediaAdapter()?.getItemBubbleText(index, sorting) ?: ""
private fun getBubbleTextItem(index: Int, sorting: Int): String {
var realIndex = index
val mediaAdapter = getMediaAdapter()
if (mediaAdapter?.isASectionTitle(index) == true) {
realIndex++
}
return mediaAdapter?.getItemBubbleText(realIndex, sorting) ?: ""
}
private fun checkLastMediaChanged() {
if (isActivityDestroyed()) {