Keep tracking read messages after sending a message with jump-to-bottom

Change-Id: I79d8fe3044f900556f8ef534ae2e25665d49f526
This commit is contained in:
SpiritCroc 2022-03-21 15:47:04 +01:00
parent d58e9bb944
commit 5ad08e4b93

View file

@ -942,6 +942,7 @@ class TimelineFragment @Inject constructor(
views.jumpToBottomView.visibility = View.INVISIBLE
views.jumpToBottomView.debouncedClicks {
views.jumpToBottomView.visibility = View.INVISIBLE
timelineViewModel.handle(RoomDetailAction.ExitTrackingUnreadMessagesState)
doJumpToBottom()
}
@ -954,7 +955,6 @@ class TimelineFragment @Inject constructor(
}
private fun doJumpToBottom() {
timelineViewModel.handle(RoomDetailAction.ExitTrackingUnreadMessagesState)
if (!timelineViewModel.timeline.isLive) {
scrollOnNewMessageCallback.forceScrollOnNextUpdate()
timelineViewModel.timeline.restartWithEventId(null)