mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-22 23:58:36 +01:00
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 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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user