Mark field 'gpgAgent' as never-nil
This commit is contained in:
parent
2ece3ef07a
commit
ea37b40e2f
10 changed files with 37 additions and 43 deletions
|
|
@ -145,7 +145,7 @@ class CredentialProviderViewController: ASCredentialProviderViewController, UITa
|
|||
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||
let entry = getPasswordEntry(by: indexPath)
|
||||
|
||||
guard self.passwordStore.pgpAgent?.isImported ?? false else {
|
||||
guard self.passwordStore.pgpAgent.isImported else {
|
||||
Utils.alert(title: "CannotCopyPassword".localize(), message: "PgpKeyNotSet.".localize(), controller: self, completion: nil)
|
||||
return
|
||||
}
|
||||
|
|
@ -165,7 +165,7 @@ class CredentialProviderViewController: ASCredentialProviderViewController, UITa
|
|||
} catch {
|
||||
DispatchQueue.main.async {
|
||||
// remove the wrong passphrase so that users could enter it next time
|
||||
self.passwordStore.pgpAgent?.passphrase = nil
|
||||
self.passwordStore.pgpAgent.passphrase = nil
|
||||
Utils.alert(title: "CannotCopyPassword".localize(), message: error.localizedDescription, controller: self, completion: nil)
|
||||
}
|
||||
}
|
||||
|
|
@ -200,7 +200,7 @@ class CredentialProviderViewController: ASCredentialProviderViewController, UITa
|
|||
}
|
||||
let _ = sem.wait(timeout: DispatchTime.distantFuture)
|
||||
if SharedDefaults[.isRememberPGPPassphraseOn] {
|
||||
self.passwordStore.pgpAgent?.passphrase = passphrase
|
||||
self.passwordStore.pgpAgent.passphrase = passphrase
|
||||
}
|
||||
return passphrase
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue