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
This commit is contained in:
SpiritCroc 2022-06-05 12:41:53 +02:00
parent 0393dd51c9
commit c54e623675
1 changed files with 1 additions and 1 deletions

View File

@ -139,7 +139,7 @@ class TimelineViewModel @AssistedInject constructor(
Timeline.Listener, ChatEffectManager.Delegate, CallProtocolsChecker.Listener, LocationSharingServiceConnection.Callback { Timeline.Listener, ChatEffectManager.Delegate, CallProtocolsChecker.Listener, LocationSharingServiceConnection.Callback {
private val room = session.getRoom(initialState.roomId)!! 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<RoomDetailAction.TimelineEventTurnsInvisible>() private val invisibleEventsSource = BehaviorDataSource<RoomDetailAction.TimelineEventTurnsInvisible>()
private val visibleEventsSource = BehaviorDataSource<RoomDetailAction.TimelineEventTurnsVisible>() private val visibleEventsSource = BehaviorDataSource<RoomDetailAction.TimelineEventTurnsVisible>()
private var timelineEvents = MutableSharedFlow<List<TimelineEvent>>(0) private var timelineEvents = MutableSharedFlow<List<TimelineEvent>>(0)