mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Removed smooth scrolling to go to bottom
This commit is contained in:
parent
59ece2f8a8
commit
f9667ff2e4
1 changed files with 7 additions and 7 deletions
|
|
@ -206,7 +206,7 @@ class ConversationFragment : SlidingPaneChildFragment() {
|
|||
"$TAG [$itemCount] new events have been loaded, scrolling to first unread message"
|
||||
)
|
||||
}
|
||||
scrollToFirstUnreadMessageOrBottom(false)
|
||||
scrollToFirstUnreadMessageOrBottom()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -508,7 +508,7 @@ class ConversationFragment : SlidingPaneChildFragment() {
|
|||
}
|
||||
|
||||
binding.setScrollToBottomClickListener {
|
||||
scrollToFirstUnreadMessageOrBottom(true)
|
||||
scrollToFirstUnreadMessageOrBottom()
|
||||
}
|
||||
|
||||
sendMessageViewModel.emojiToAddEvent.observe(viewLifecycleOwner) {
|
||||
|
|
@ -760,7 +760,7 @@ class ConversationFragment : SlidingPaneChildFragment() {
|
|||
currentChatMessageModelForBottomSheet = null
|
||||
}
|
||||
|
||||
private fun scrollToFirstUnreadMessageOrBottom(smooth: Boolean) {
|
||||
private fun scrollToFirstUnreadMessageOrBottom() {
|
||||
if (adapter.itemCount == 0) return
|
||||
|
||||
val recyclerView = binding.eventsList
|
||||
|
|
@ -776,10 +776,10 @@ class ConversationFragment : SlidingPaneChildFragment() {
|
|||
Log.i(
|
||||
"$TAG Scrolling to position $indexToScrollTo, first unread message is at $firstUnreadMessagePosition"
|
||||
)
|
||||
if (smooth) {
|
||||
recyclerView.smoothScrollToPosition(indexToScrollTo)
|
||||
} else {
|
||||
recyclerView.scrollToPosition(indexToScrollTo)
|
||||
recyclerView.scrollToPosition(indexToScrollTo)
|
||||
|
||||
if (indexToScrollTo == adapter.itemCount - 1) {
|
||||
viewModel.isUserScrollingUp.postValue(false)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue