avoid showing empty fastscroller bubble if the current item is a section
This commit is contained in:
parent
8e1cd62c7c
commit
cd79467ff6
1 changed files with 8 additions and 1 deletions
|
@ -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() {
|
private fun checkLastMediaChanged() {
|
||||||
if (isActivityDestroyed()) {
|
if (isActivityDestroyed()) {
|
||||||
|
|
Loading…
Reference in a new issue