Check for readiness before doing any import actions

This commit is contained in:
Danny Moesch 2020-02-10 21:59:56 +01:00 committed by Mingshen Sun
parent a5570a8409
commit ea27c73b99
2 changed files with 4 additions and 4 deletions

View file

@ -38,6 +38,9 @@ extension PGPKeyImporter {
extension PGPKeyImporter where Self: UIViewController {
func savePassphraseDialog() {
guard self.isReadyToUse() else {
return
}
let savePassphraseAlert = UIAlertController(title: "Passphrase".localize(), message: "WantToSavePassphrase?".localize(), preferredStyle: .alert)
// Do not save the key's passphrase.
savePassphraseAlert.addAction(UIAlertAction(title: "No".localize(), style: .default) { _ in