diff --git a/iOS/Inspector/AccountInspectorViewController.swift b/iOS/Inspector/AccountInspectorViewController.swift index fb0f153dc..ca6087fcf 100644 --- a/iOS/Inspector/AccountInspectorViewController.swift +++ b/iOS/Inspector/AccountInspectorViewController.swift @@ -74,9 +74,13 @@ class AccountInspectorViewController: UITableViewController { let markTitle = NSLocalizedString("Delete", comment: "Delete") 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) - self?.navigationController?.popViewController(animated: true) + if self.isModal { + self.dismiss(animated: true) + } else { + self.navigationController?.popViewController(animated: true) + } } alertController.addAction(markAction)