Revert "Revert "stop listening timeline collection changes when app is not resumed (#7734)""
Upstream fix incoming
This reverts commit 987ca6dec4
.
Change-Id: I3cec506b84cf1e469133df5276640d099e3c33de
This commit is contained in:
parent
2542d7de83
commit
702142f62f
|
@ -1166,6 +1166,7 @@ class TimelineFragment :
|
||||||
notificationDrawerManager.setCurrentThread(timelineArgs.threadTimelineArgs?.rootThreadEventId)
|
notificationDrawerManager.setCurrentThread(timelineArgs.threadTimelineArgs?.rootThreadEventId)
|
||||||
roomDetailPendingActionStore.data?.let { handlePendingAction(it) }
|
roomDetailPendingActionStore.data?.let { handlePendingAction(it) }
|
||||||
roomDetailPendingActionStore.data = null
|
roomDetailPendingActionStore.data = null
|
||||||
|
views.timelineRecyclerView.adapter = timelineEventController.adapter
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun handlePendingAction(roomDetailPendingAction: RoomDetailPendingAction) {
|
private fun handlePendingAction(roomDetailPendingAction: RoomDetailPendingAction) {
|
||||||
|
@ -1184,6 +1185,7 @@ class TimelineFragment :
|
||||||
super.onPause()
|
super.onPause()
|
||||||
notificationDrawerManager.setCurrentRoom(null)
|
notificationDrawerManager.setCurrentRoom(null)
|
||||||
notificationDrawerManager.setCurrentThread(null)
|
notificationDrawerManager.setCurrentThread(null)
|
||||||
|
views.timelineRecyclerView.adapter = null
|
||||||
}
|
}
|
||||||
|
|
||||||
private val emojiActivityResultLauncher = registerStartForActivityResult { activityResult ->
|
private val emojiActivityResultLauncher = registerStartForActivityResult { activityResult ->
|
||||||
|
@ -1322,7 +1324,6 @@ class TimelineFragment :
|
||||||
it.dispatchTo(scrollOnHighlightedEventCallback)
|
it.dispatchTo(scrollOnHighlightedEventCallback)
|
||||||
}
|
}
|
||||||
timelineEventController.addModelBuildListener(modelBuildListener)
|
timelineEventController.addModelBuildListener(modelBuildListener)
|
||||||
views.timelineRecyclerView.adapter = timelineEventController.adapter
|
|
||||||
views.timelineRecyclerView.addOnScrollListener(object: RecyclerView.OnScrollListener() {
|
views.timelineRecyclerView.addOnScrollListener(object: RecyclerView.OnScrollListener() {
|
||||||
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
||||||
if (dy != 0) {
|
if (dy != 0) {
|
||||||
|
|
Loading…
Reference in New Issue