clarify public vs private keys + make prvate key IDs available

This commit is contained in:
Lysann Tranvouez 2026-03-11 16:16:50 +01:00
parent 4e19d9e714
commit 5a92b6fda7
11 changed files with 56 additions and 30 deletions

View file

@ -38,10 +38,10 @@ public extension UIAlertAction {
}
}
static func selectKey(controller: UIViewController, handler: ((UIAlertAction) -> Void)?) -> UIAlertAction {
static func selectKey(type: PGPKey, controller: UIViewController, handler: ((UIAlertAction) -> Void)?) -> UIAlertAction {
UIAlertAction(title: "Select Key", style: .default) { _ in
let selectKeyAlert = UIAlertController(title: "Select from imported keys", message: nil, preferredStyle: .actionSheet)
try? PGPAgent.shared.getShortKeyID().forEach { keyID in
try? PGPAgent.shared.getShortKeyIDs(type: type).forEach { keyID in
let action = UIAlertAction(title: keyID, style: .default, handler: handler)
selectKeyAlert.addAction(action)
}