Fix PGP key importing issue
This commit is contained in:
parent
c35aedb7ad
commit
50dec23b02
1 changed files with 5 additions and 1 deletions
|
|
@ -39,6 +39,8 @@ class SettingsTableViewController: UITableViewController, UITabBarControllerDele
|
||||||
DispatchQueue.global(qos: .userInitiated).async { [unowned self] in
|
DispatchQueue.global(qos: .userInitiated).async { [unowned self] in
|
||||||
Defaults.pgpKeySource = type(of: keyImporter).keySource
|
Defaults.pgpKeySource = type(of: keyImporter).keySource
|
||||||
do {
|
do {
|
||||||
|
// Remove exiting passphrase
|
||||||
|
AppKeychain.shared.removeAllContent(withPrefix: Globals.pgpKeyPassphrase)
|
||||||
try keyImporter.importKeys()
|
try keyImporter.importKeys()
|
||||||
try PGPAgent.shared.initKeys()
|
try PGPAgent.shared.initKeys()
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
|
|
@ -148,7 +150,9 @@ class SettingsTableViewController: UITableViewController, UITabBarControllerDele
|
||||||
})
|
})
|
||||||
|
|
||||||
if isReadyToUse() {
|
if isReadyToUse() {
|
||||||
optionMenu.addAction(UIAlertAction(title: "\(Self.menuLabel) (\("Import".localize()))", style: .default))
|
optionMenu.addAction(UIAlertAction(title: "\(Self.menuLabel) (\("Import".localize()))", style: .default) { _ in
|
||||||
|
self.saveImportedKeys()
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
optionMenu.addAction(UIAlertAction(title: "\(Self.menuLabel) (\("Tips".localize()))", style: .default) { _ in
|
optionMenu.addAction(UIAlertAction(title: "\(Self.menuLabel) (\("Tips".localize()))", style: .default) { _ in
|
||||||
let title = "Tips".localize()
|
let title = "Tips".localize()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue