From c54e62367535c117a3835393249c09500088dc99 Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Sun, 5 Jun 2022 12:41:53 +0200 Subject: [PATCH] Fix loading threads with "open at unread" enabled Open at unread isn't supported for threads (we do not have separate read markers for threads as far as I'm aware), so if we try to open at the recent read, it won't work. Change-Id: I39eef8d7ce11558f5db190b02a5f601556d24d2f --- .../vector/app/features/home/room/detail/TimelineViewModel.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineViewModel.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineViewModel.kt index b0b8b1f034..4884429073 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineViewModel.kt @@ -139,7 +139,7 @@ class TimelineViewModel @AssistedInject constructor( Timeline.Listener, ChatEffectManager.Delegate, CallProtocolsChecker.Listener, LocationSharingServiceConnection.Callback { private val room = session.getRoom(initialState.roomId)!! - private val eventId = initialState.eventId ?: if (loadRoomAtFirstUnread()) room.roomSummary()?.readMarkerId else null + private val eventId = initialState.eventId ?: if (loadRoomAtFirstUnread() && initialState.rootThreadEventId == null) room.roomSummary()?.readMarkerId else null private val invisibleEventsSource = BehaviorDataSource() private val visibleEventsSource = BehaviorDataSource() private var timelineEvents = MutableSharedFlow>(0)