Skip to content

Commit

Permalink
GH-3096 repair the generated key flow
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryBespalov committed Aug 21, 2023
1 parent c3c9225 commit 5a334ca
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Multisig/UI/Settings/OwnerKeyManagement/Backup/UIFlow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,13 @@ class UIFlow: NSObject {
if let presentedViewController = presenter.presentedViewController {
presentedViewController.dismiss(animated: true) { [weak self] in
self?.presenter.present(nav, animated: true)
// the actual presenting view controller might be different from the `presenter`
self?.presenter = nav.presentingViewController
}
} else {
presenter.present(nav, animated: true)
// the actual presenting view controller might be different from the `presenter`
presenter = nav.presentingViewController
}
}

Expand All @@ -71,13 +75,8 @@ class UIFlow: NSObject {
}

func stop(success: Bool) {
if let presenter = presenter, presenter.presentedViewController != nil {
presenter.dismiss(animated: true) { [unowned self] in
completion(success)
}
} else if let presenter = navigationController.presentingViewController {
// in this case, the presenting view controller is not a direct ancestor of the
// currently opened view controller
if let presenter = presenter {
assert(presenter.presentedViewController != nil)
presenter.dismiss(animated: true) { [unowned self] in
completion(success)
}
Expand Down

0 comments on commit 5a334ca

Please sign in to comment.