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

@ -96,8 +96,7 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
}
} catch {
DispatchQueue.main.async {
SVProgressHUD.showError(withStatus: error.localizedDescription)
SVProgressHUD.dismiss(withDelay: 1)
Utils.alert(title: "Error", message: error.localizedDescription, controller: self, completion: nil)
}
}
}
@ -136,8 +135,7 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
}
} catch {
DispatchQueue.main.async {
SVProgressHUD.showError(withStatus: error.localizedDescription)
SVProgressHUD.dismiss(withDelay: 1)
Utils.alert(title: "Error", message: error.localizedDescription, controller: self, completion: nil)
}
}
}
@ -325,8 +323,7 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
} catch {
print(error)
DispatchQueue.main.async {
SVProgressHUD.showError(withStatus: error.localizedDescription)
SVProgressHUD.dismiss(withDelay: 1)
Utils.alert(title: "Error", message: error.localizedDescription, controller: self, completion: nil)
}
}
}