diff --git a/pass/Controllers/AdvancedSettingsTableViewController.swift b/pass/Controllers/AdvancedSettingsTableViewController.swift index 7b22c93..e7d12fe 100644 --- a/pass/Controllers/AdvancedSettingsTableViewController.swift +++ b/pass/Controllers/AdvancedSettingsTableViewController.swift @@ -20,8 +20,8 @@ class AdvancedSettingsTableViewController: UITableViewController { } override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + tableView.deselectRow(at: indexPath, animated: true) if tableView.cellForRow(at: indexPath) == eraseDataTableViewCell { - print("erase data") let alert = UIAlertController(title: "Erase Password Store Data?", message: "This will delete all local data and settings. Password store data on your remote server will not be affected.", preferredStyle: UIAlertControllerStyle.alert) alert.addAction(UIAlertAction(title: "Erase Password Data", style: UIAlertActionStyle.destructive, handler: {[unowned self] (action) -> Void in SVProgressHUD.show(withStatus: "Erasing ...") @@ -32,7 +32,6 @@ class AdvancedSettingsTableViewController: UITableViewController { })) alert.addAction(UIAlertAction(title: "Dismiss", style: UIAlertActionStyle.cancel, handler:nil)) self.present(alert, animated: true, completion: nil) - tableView.deselectRow(at: indexPath, animated: true) } 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) alert.addAction(UIAlertAction(title: "Discard All Changes", style: UIAlertActionStyle.destructive, handler: {[unowned self] (action) -> Void in @@ -62,7 +61,6 @@ class AdvancedSettingsTableViewController: UITableViewController { })) alert.addAction(UIAlertAction(title: "Dismiss", style: UIAlertActionStyle.cancel, handler:nil)) self.present(alert, animated: true, completion: nil) - tableView.deselectRow(at: indexPath, animated: true) } }