From 2e8d96b94157ac648219de9bba69938a85e30284 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 23 Dec 2020 15:00:46 +0100 Subject: [PATCH] add better handling for the main screens scrollbar --- .../smsmessenger/activities/MainActivity.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt index e01db39b..966e1755 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/MainActivity.kt @@ -86,6 +86,8 @@ class MainActivity : SimpleActivity() { updateTextColors(main_coordinator) no_conversations_placeholder_2.setTextColor(getAdjustedPrimaryColor()) no_conversations_placeholder_2.underlineText() + conversations_fastscroller.updatePrimaryColor() + conversations_fastscroller.updateBubbleColors() checkShortcut() } @@ -231,6 +233,11 @@ class MainActivity : SimpleActivity() { }.apply { conversations_list.adapter = this } + + conversations_fastscroller.setViews(conversations_list) { + val listItem = (conversations_list.adapter as? ConversationsAdapter)?.conversations?.getOrNull(it) + conversations_fastscroller.updateBubbleText(listItem?.title ?: "") + } } else { try { (currAdapter as ConversationsAdapter).updateConversations(conversations)