Fix child presentation of the same room. (#2669)

This commit is contained in:
Doug
2024-04-09 11:11:14 +01:00
committed by GitHub
parent 761824fa0d
commit bc75fe1cf8
2 changed files with 31 additions and 5 deletions
@@ -112,8 +112,10 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
case .childRoom(let roomID):
if case .presentingChild = stateMachine.state, let childRoomFlowCoordinator {
childRoomFlowCoordinator.handleAppRoute(appRoute, animated: animated)
} else {
} else if roomID != roomProxy.id {
stateMachine.tryEvent(.presentChildRoom(roomID: roomID), userInfo: EventUserInfo(animated: animated))
} else {
MXLog.info("Ignoring presentation of the same room as a child of this one.")
}
case .roomDetails(let roomID):
guard roomID == roomProxy.id else { fatalError("Navigation route doesn't belong to this room flow.") }