Polish AdvancedSettingsTableViewController
This commit is contained in:
parent
b429a6baf1
commit
2f790d7923
1 changed files with 15 additions and 19 deletions
|
|
@ -60,9 +60,7 @@ class AdvancedSettingsTableViewController: UITableViewController {
|
||||||
} else if tableView.cellForRow(at: indexPath) == discardChangesTableViewCell {
|
} else if tableView.cellForRow(at: indexPath) == discardChangesTableViewCell {
|
||||||
let alert = UIAlertController(title: "Discard All Changes?", message: "Do you want to permanently discard all changes to the local copy of your password data? You cannot undo this action.", preferredStyle: UIAlertControllerStyle.alert)
|
let alert = UIAlertController(title: "Discard All Changes?", message: "Do you want to permanently discard all changes to the local copy of your password data? You cannot undo this action.", preferredStyle: UIAlertControllerStyle.alert)
|
||||||
alert.addAction(UIAlertAction(title: "Discard All Changes", style: UIAlertActionStyle.destructive, handler: {[unowned self] (action) -> Void in
|
alert.addAction(UIAlertAction(title: "Discard All Changes", style: UIAlertActionStyle.destructive, handler: {[unowned self] (action) -> Void in
|
||||||
DispatchQueue.global(qos: .userInitiated).async {
|
|
||||||
SVProgressHUD.show(withStatus: "Resetting ...")
|
SVProgressHUD.show(withStatus: "Resetting ...")
|
||||||
DispatchQueue.main.async {
|
|
||||||
do {
|
do {
|
||||||
let numberDiscarded = try self.passwordStore.reset()
|
let numberDiscarded = try self.passwordStore.reset()
|
||||||
self.navigationController!.popViewController(animated: true)
|
self.navigationController!.popViewController(animated: true)
|
||||||
|
|
@ -78,8 +76,6 @@ class AdvancedSettingsTableViewController: UITableViewController {
|
||||||
} catch {
|
} catch {
|
||||||
Utils.alert(title: "Error", message: error.localizedDescription, controller: self, completion: nil)
|
Utils.alert(title: "Error", message: error.localizedDescription, controller: self, completion: nil)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}))
|
}))
|
||||||
alert.addAction(UIAlertAction(title: "Dismiss", style: UIAlertActionStyle.cancel, handler:nil))
|
alert.addAction(UIAlertAction(title: "Dismiss", style: UIAlertActionStyle.cancel, handler:nil))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue