Automatically dismiss account inspector on account deletion when presented as a modal dialog.
This commit is contained in:
parent
098f5050eb
commit
69c3d218b9
|
@ -74,9 +74,13 @@ class AccountInspectorViewController: UITableViewController {
|
||||||
|
|
||||||
let markTitle = NSLocalizedString("Delete", comment: "Delete")
|
let markTitle = NSLocalizedString("Delete", comment: "Delete")
|
||||||
let markAction = UIAlertAction(title: markTitle, style: .default) { [weak self] (action) in
|
let markAction = UIAlertAction(title: markTitle, style: .default) { [weak self] (action) in
|
||||||
guard let account = self?.account else { return }
|
guard let self = self, let account = self.account else { return }
|
||||||
AccountManager.shared.deleteAccount(account)
|
AccountManager.shared.deleteAccount(account)
|
||||||
self?.navigationController?.popViewController(animated: true)
|
if self.isModal {
|
||||||
|
self.dismiss(animated: true)
|
||||||
|
} else {
|
||||||
|
self.navigationController?.popViewController(animated: true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
alertController.addAction(markAction)
|
alertController.addAction(markAction)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue