fixed existing tests and added tests for all the threaded flows

This commit is contained in:
Mauro Romito
2025-10-01 19:12:57 +02:00
committed by Mauro
parent a42cb77368
commit 8f31671e10
4 changed files with 106 additions and 5 deletions
@@ -173,8 +173,9 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
if case .thread(threadRootEventID: threadRootEventID, _) = stateMachine.state, let threadCoordinator = childThreads.last {
threadCoordinator.focusOnEvent(eventID: eventID)
} else {
// If we are showing the room timeline, we want to focus the thread root
if childThreads.isEmpty {
roomScreenCoordinator?.focusOnEvent(.init(eventID: eventID, shouldSetPin: false))
roomScreenCoordinator?.focusOnEvent(.init(eventID: threadRootEventID, shouldSetPin: false))
}
stateMachine.tryEvent(.presentThread(threadRootEventID: threadRootEventID, focusEventID: eventID))
}