mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Introduce a StartChatFlowCoordinator instead of handing a navigation stack to the Screen Coordinator. (#4674)
* Introduce a basic StartChatFlowCoordinator. * Move the rest of the start chat flow from the screen coordinator into the flow coordinator. * Add a UI test for the entire start chat flow. * Refactor CreateRoom… to CreateRoomScreen…
This commit is contained in:
@@ -65,7 +65,7 @@ class StartChatScreenViewModel: StartChatScreenViewModelType, StartChatScreenVie
|
||||
switch currentDirectRoom {
|
||||
case .success(.some(let roomId)):
|
||||
hideLoadingIndicator()
|
||||
actionsSubject.send(.showRoom(withIdentifier: roomId))
|
||||
actionsSubject.send(.showRoom(roomID: roomId))
|
||||
case .success:
|
||||
hideLoadingIndicator()
|
||||
state.bindings.selectedUserToInvite = user
|
||||
@@ -190,7 +190,7 @@ class StartChatScreenViewModel: StartChatScreenViewModelType, StartChatScreenVie
|
||||
switch await userSession.clientProxy.createDirectRoom(with: user.userID, expectedRoomName: user.displayName) {
|
||||
case .success(let roomId):
|
||||
analytics.trackCreatedRoom(isDM: true)
|
||||
actionsSubject.send(.showRoom(withIdentifier: roomId))
|
||||
actionsSubject.send(.showRoom(roomID: roomId))
|
||||
case .failure:
|
||||
displayError()
|
||||
}
|
||||
@@ -205,7 +205,7 @@ class StartChatScreenViewModel: StartChatScreenViewModelType, StartChatScreenVie
|
||||
private func joinRoomByAddress() {
|
||||
if case let .addressFound(lastTestedAddress, roomID) = internalRoomAddressState,
|
||||
lastTestedAddress == state.bindings.roomAddress {
|
||||
actionsSubject.send(.showRoom(withIdentifier: roomID))
|
||||
actionsSubject.send(.showRoom(roomID: roomID))
|
||||
} else if let resolveAliasTask {
|
||||
// If the task is still running we wait for it to complete and we check the state again
|
||||
showLoadingIndicator(delay: .milliseconds(250))
|
||||
|
||||
Reference in New Issue
Block a user