mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 03:18:06 +00:00
Fixed broken scroll listener in conversation after the fragment is paused/resumed
This commit is contained in:
parent
07cb09128e
commit
508f1154f5
1 changed files with 4 additions and 4 deletions
|
|
@ -220,10 +220,6 @@ open class ConversationFragment : SlidingPaneChildFragment() {
|
|||
}
|
||||
}
|
||||
|
||||
if (::scrollListener.isInitialized) {
|
||||
binding.eventsList.addOnScrollListener(scrollListener)
|
||||
}
|
||||
|
||||
val unreadCount = viewModel.unreadMessagesCount.value ?: 0
|
||||
if (unreadCount > 0) {
|
||||
Log.i(
|
||||
|
|
@ -989,6 +985,10 @@ open class ConversationFragment : SlidingPaneChildFragment() {
|
|||
.viewTreeObserver
|
||||
.addOnGlobalLayoutListener(globalLayoutObserver)
|
||||
|
||||
if (::scrollListener.isInitialized) {
|
||||
binding.eventsList.addOnScrollListener(scrollListener)
|
||||
}
|
||||
|
||||
try {
|
||||
adapter.registerAdapterDataObserver(dataObserver)
|
||||
} catch (e: IllegalStateException) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue