Change notification observer from "showPassword" to "decryptThenShowPassword"
- avoid crash when password has been deleted
This commit is contained in:
parent
174128998c
commit
e549db0714
2 changed files with 16 additions and 12 deletions
|
|
@ -64,13 +64,13 @@ class Utils {
|
|||
return randomString
|
||||
}
|
||||
|
||||
static func alert(title: String, message: String, controller: UIViewController, completion: (() -> Void)?) {
|
||||
static func alert(title: String, message: String, controller: UIViewController, handler: ((UIAlertAction) -> Void)? = nil, completion: (() -> Void)? = nil) {
|
||||
SVProgressHUD.dismiss()
|
||||
let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.alert)
|
||||
alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil))
|
||||
alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: handler))
|
||||
controller.present(alert, animated: true, completion: completion)
|
||||
|
||||
}
|
||||
|
||||
|
||||
static func removePGPKeys() {
|
||||
removeFileIfExists(atPath: Globals.pgpPublicKeyPath)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue