Check for readiness before doing any import actions
This commit is contained in:
parent
a5570a8409
commit
ea27c73b99
2 changed files with 4 additions and 4 deletions
|
|
@ -26,16 +26,13 @@ class SettingsTableViewController: UITableViewController, UITabBarControllerDele
|
|||
}
|
||||
|
||||
@IBAction func savePGPKey(segue: UIStoryboardSegue) {
|
||||
guard let sourceController = segue.source as? PGPKeyImporter else {
|
||||
guard let sourceController = segue.source as? PGPKeyImporter, sourceController.isReadyToUse() else {
|
||||
return
|
||||
}
|
||||
savePGPKey(using: sourceController)
|
||||
}
|
||||
|
||||
private func savePGPKey(using keyImporter: PGPKeyImporter) {
|
||||
guard keyImporter.isReadyToUse() else {
|
||||
return
|
||||
}
|
||||
SVProgressHUD.setDefaultMaskType(.black)
|
||||
SVProgressHUD.setDefaultStyle(.light)
|
||||
SVProgressHUD.show(withStatus: "FetchingPgpKey".localize())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue