show the appropriate bubble text at fastscrolling Recents

This commit is contained in:
tibbi 2018-08-04 18:27:12 +02:00
parent 46580c3620
commit dc23bac57f
1 changed files with 4 additions and 1 deletions

View File

@ -30,7 +30,10 @@ class RecentsFragment(context: Context, attributeSet: AttributeSet) : MyViewPage
fragment_list.adapter = this
}
fragment_fastscroller.setViews(fragment_list) {}
fragment_fastscroller.setViews(fragment_list) {
val item = (fragment_list.adapter as RecentCallsAdapter).recentCalls.getOrNull(it)
fragment_fastscroller.updateBubbleText(item?.name ?: item?.number ?: "")
}
} else {
(currAdapter as RecentCallsAdapter).updateItems(recentCalls)
}