mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
feat: instantly scroll to bottom if already smooth scrolling on button tap
fixes #736
This commit is contained in:
parent
00c2642b47
commit
b3a850a876
@ -234,7 +234,14 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
||||
setUpLinkPreviewObserver()
|
||||
restoreDraftIfNeeded()
|
||||
addOpenGroupGuidelinesIfNeeded()
|
||||
scrollToBottomButton.setOnClickListener { conversationRecyclerView.smoothScrollToPosition(0) }
|
||||
scrollToBottomButton.setOnClickListener {
|
||||
val layoutManager = conversationRecyclerView.layoutManager ?: return@setOnClickListener
|
||||
if (layoutManager.isSmoothScrolling) {
|
||||
conversationRecyclerView.scrollToPosition(0)
|
||||
} else {
|
||||
conversationRecyclerView.smoothScrollToPosition(0)
|
||||
}
|
||||
}
|
||||
unreadCount = DatabaseFactory.getMmsSmsDatabase(this).getUnreadCount(threadID)
|
||||
updateUnreadCountIndicator()
|
||||
setUpTypingObserver()
|
||||
|
Loading…
Reference in New Issue
Block a user