Show error in alert instead of HUD

This commit is contained in:
Bob Sun 2017-03-16 23:12:31 -07:00
parent d2cff20131
commit 0ad9713fc0
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
5 changed files with 10 additions and 18 deletions

View file

@ -53,8 +53,7 @@ class SettingsTableViewController: UITableViewController {
} catch {
DispatchQueue.main.async {
self.pgpKeyTableViewCell.detailTextLabel?.text = "Not Set"
SVProgressHUD.showError(withStatus: error.localizedDescription)
SVProgressHUD.dismiss(withDelay: 1)
Utils.alert(title: "Error", message: error.localizedDescription, controller: self, completion: nil)
}
}
}
@ -84,8 +83,7 @@ class SettingsTableViewController: UITableViewController {
} catch {
DispatchQueue.main.async {
self.pgpKeyTableViewCell.detailTextLabel?.text = "Not Set"
SVProgressHUD.showError(withStatus: error.localizedDescription)
SVProgressHUD.dismiss(withDelay: 1)
Utils.alert(title: "Error", message: error.localizedDescription, controller: self, completion: nil)
}
}
}
@ -155,9 +153,7 @@ class SettingsTableViewController: UITableViewController {
}
} catch {
DispatchQueue.main.async {
print(error)
SVProgressHUD.showError(withStatus: error.localizedDescription)
SVProgressHUD.dismiss(withDelay: 1)
Utils.alert(title: "Error", message: error.localizedDescription, controller: self, completion: nil)
}
}