mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Fix navigationStackCoordinator getting torn down when being reset on … (#613)
* Fix navigationStackCoordinator getting torn down when being reset on the navigationSplitCoordinator, added unit tests for it * Guard against using the same coordinator more than once
This commit is contained in:
@@ -168,8 +168,7 @@ class UserSessionFlowCoordinator: CoordinatorProtocol {
|
||||
emojiProvider: emojiProvider)
|
||||
let coordinator = RoomScreenCoordinator(parameters: parameters)
|
||||
|
||||
detailNavigationStackCoordinator.setRootCoordinator(coordinator)
|
||||
navigationSplitCoordinator.setDetailCoordinator(detailNavigationStackCoordinator) { [weak self, roomIdentifier] in
|
||||
detailNavigationStackCoordinator.setRootCoordinator(coordinator) { [weak self, roomIdentifier] in
|
||||
guard let self else { return }
|
||||
|
||||
// Move the state machine to no room selected if the room currently being dimissed
|
||||
@@ -180,6 +179,10 @@ class UserSessionFlowCoordinator: CoordinatorProtocol {
|
||||
self.detailNavigationStackCoordinator.setRootCoordinator(nil)
|
||||
}
|
||||
}
|
||||
|
||||
if navigationSplitCoordinator.detailCoordinator == nil {
|
||||
navigationSplitCoordinator.setDetailCoordinator(detailNavigationStackCoordinator)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user