Fix passphrase issue

This commit is contained in:
Mingshen Sun 2021-01-07 22:35:45 -08:00
parent a62792bd11
commit 1e1d6f0f44
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
2 changed files with 8 additions and 3 deletions

View file

@ -43,7 +43,12 @@ public enum Utils {
let sem = DispatchSemaphore(value: 0)
var passphrase = ""
DispatchQueue.main.async {
let title = "Passphrase".localize() + " (\(keyID.suffix(8)))"
var title: String!
if keyID.isEmpty {
title = "Passphrase".localize()
} else {
title = "Passphrase".localize() + " (\(keyID.suffix(8)))"
}
let message = "FillInPgpPassphrase.".localize()
let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)
alert.addAction(