Skip to content
Snippets Groups Projects
Commit cc177a6c authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

Revert "Avoid showing the initial loading view after welcome form"

This reverts commit 6fe6d36d.

Change-Id: Ifdec6eb5b1a2d4f2e5e5a9e96a4ee95ec848c6ec
parent 14ca2ca3
No related branches found
No related tags found
No related merge requests found
...@@ -102,12 +102,6 @@ final class AppCoordinator: Coordinator, StateableResponsive { ...@@ -102,12 +102,6 @@ final class AppCoordinator: Coordinator, StateableResponsive {
self.dispatchApplication() self.dispatchApplication()
} }
/// Starts the coordinator
func startWithoutLoading() {
// ~ Dispatch to the proper screen
self.dispatchApplication()
}
func migrateAccount(accountId: String) { func migrateAccount(accountId: String) {
let migratonController = MigrateAccountViewController.instantiate(with: self.injectionBag) let migratonController = MigrateAccountViewController.instantiate(with: self.injectionBag)
migratonController.viewModel.accountToMigrate = accountId migratonController.viewModel.accountToMigrate = accountId
...@@ -145,16 +139,22 @@ final class AppCoordinator: Coordinator, StateableResponsive { ...@@ -145,16 +139,22 @@ final class AppCoordinator: Coordinator, StateableResponsive {
let walkthroughCoordinator = WalkthroughCoordinator(with: self.injectionBag) let walkthroughCoordinator = WalkthroughCoordinator(with: self.injectionBag)
walkthroughCoordinator.isAccountFirst = isAccountFirst walkthroughCoordinator.isAccountFirst = isAccountFirst
walkthroughCoordinator.withAnimations = animated walkthroughCoordinator.withAnimations = animated
walkthroughCoordinator.parentCoordinator = self
walkthroughCoordinator.start() walkthroughCoordinator.start()
self.navigationController.setViewControllers([], animated: false)
self.addChildCoordinator(childCoordinator: walkthroughCoordinator) self.addChildCoordinator(childCoordinator: walkthroughCoordinator)
let walkthroughViewController = walkthroughCoordinator.rootViewController let walkthroughViewController = walkthroughCoordinator.rootViewController
self.present(viewController: walkthroughViewController, self.present(viewController: walkthroughViewController,
withStyle: .appear, withStyle: .appear,
withAnimation: true, withAnimation: true,
disposeBag: self.disposeBag) disposeBag: self.disposeBag)
walkthroughViewController.rx.controllerWasDismissed
.subscribe(onNext: { [weak self, weak walkthroughCoordinator] (_) in
walkthroughCoordinator?.stateSubject.dispose()
self?.removeChildCoordinator(childCoordinator: walkthroughCoordinator)
self?.dispatchApplication()
})
.disposed(by: self.disposeBag)
} }
/// Presents the main interface /// Presents the main interface
......
...@@ -75,12 +75,8 @@ class WalkthroughCoordinator: Coordinator, StateableResponsive { ...@@ -75,12 +75,8 @@ class WalkthroughCoordinator: Coordinator, StateableResponsive {
self.showAddAccount(with: walkthroughType) self.showAddAccount(with: walkthroughType)
case .accountCreated, .deviceLinked: case .accountCreated, .deviceLinked:
if self.rootViewController.presentedViewController != nil { if self.rootViewController.presentedViewController != nil {
if let appCoordinator = self.parentCoordinator as? AppCoordinator { self.rootViewController.dismiss(animated: true) { [weak self] in // dismiss the pop up form modal view
appCoordinator.startWithoutLoading() self?.rootViewController.dismiss(animated: true) // dismiss the welcome view and check for user account state
appCoordinator.removeChildCoordinator(childCoordinator: self)
self.rootViewController.presentedViewController?.dismiss(animated: true) {
self.rootViewController.dismiss(animated: false)
}
} }
} }
case .walkthroughCanceled: case .walkthroughCanceled:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment