Cancel inCoordinator if last wallet removed

pull/2/head
Michael Scoff 7 years ago
parent dbce039b2b
commit 225f84f158
  1. 1
      Trust/InCoordinator.swift
  2. 2
      Trust/Settings/Coordinators/SettingsCoordinator.swift

@ -184,6 +184,7 @@ extension InCoordinator: SettingsCoordinatorDelegate {
func didCancel(in coordinator: SettingsCoordinator) {
removeCoordinator(coordinator)
coordinator.navigationController.dismiss(animated: true, completion: nil)
delegate?.didCancel(in: self)
}
func didRestart(with account: Account, in coordinator: SettingsCoordinator) {

@ -7,6 +7,7 @@ protocol SettingsCoordinatorDelegate: class {
func didUpdate(action: SettingsAction, in coordinator: SettingsCoordinator)
func didRestart(with account: Account, in coordinator: SettingsCoordinator)
func didUpdateAccounts(in coordinator: SettingsCoordinator)
func didCancel(in coordinator: SettingsCoordinator)
}
class SettingsCoordinator: Coordinator {
@ -86,6 +87,7 @@ extension SettingsCoordinator: AccountsCoordinatorDelegate {
delegate?.didUpdateAccounts(in: self)
guard !coordinator.accountsViewController.hasAccounts else { return }
coordinator.navigationController.dismiss(animated: true, completion: nil)
delegate?.didCancel(in: self)
}
func didCancel(in coordinator: AccountsCoordinator) {

Loading…
Cancel
Save