* fix #540, duplicate entries in auto fill extension `prepareCredentialList` is called twice, once before unlock and once after. If the lists are already prepared, i.e. not empty, skip this step. * fix format and lint
This commit is contained in:
parent
31c6541f9e
commit
51ad0c2920
4 changed files with 11 additions and 5 deletions
|
|
@ -172,6 +172,7 @@ class GitRepositorySettingsTableViewController: UITableViewController, PasswordA
|
||||||
|
|
||||||
// Remember git credential password/passphrase temporarily, ask whether users want this after a successful clone.
|
// Remember git credential password/passphrase temporarily, ask whether users want this after a successful clone.
|
||||||
Defaults.isRememberGitCredentialPassphraseOn = true
|
Defaults.isRememberGitCredentialPassphraseOn = true
|
||||||
|
// swiftlint:disable:next closure_body_length
|
||||||
DispatchQueue.global(qos: .userInitiated).async {
|
DispatchQueue.global(qos: .userInitiated).async {
|
||||||
do {
|
do {
|
||||||
let transferProgressBlock: (UnsafePointer<git_transfer_progress>, UnsafeMutablePointer<ObjCBool>) -> Void = { git_transfer_progress, _ in
|
let transferProgressBlock: (UnsafePointer<git_transfer_progress>, UnsafeMutablePointer<ObjCBool>) -> Void = { git_transfer_progress, _ in
|
||||||
|
|
|
||||||
|
|
@ -140,11 +140,12 @@ class QRScannerController: UIViewController, AVCaptureMetadataOutputObjectsDeleg
|
||||||
preferredStyle: .alert
|
preferredStyle: .alert
|
||||||
)
|
)
|
||||||
alertController.addAction(UIAlertAction(title: "Cancel".localize(), style: .default))
|
alertController.addAction(UIAlertAction(title: "Cancel".localize(), style: .default))
|
||||||
alertController.addAction(UIAlertAction(title: "Settings".localize(), style: .cancel) { _ in
|
alertController.addAction(
|
||||||
if let url = URL(string: UIApplication.openSettingsURLString) {
|
UIAlertAction(title: "Settings".localize(), style: .cancel) { _ in
|
||||||
UIApplication.shared.open(url)
|
if let url = URL(string: UIApplication.openSettingsURLString) {
|
||||||
|
UIApplication.shared.open(url)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
)
|
)
|
||||||
present(alertController, animated: true)
|
present(alertController, animated: true)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,7 @@ public func yubiKeyDecrypt(
|
||||||
extension Data {
|
extension Data {
|
||||||
struct HexEncodingOptions: OptionSet {
|
struct HexEncodingOptions: OptionSet {
|
||||||
let rawValue: Int
|
let rawValue: Int
|
||||||
static let upperCase = HexEncodingOptions(rawValue: 1 << 0)
|
static let upperCase = Self(rawValue: 1 << 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
func hexEncodedString(options: HexEncodingOptions = []) -> String {
|
func hexEncodedString(options: HexEncodingOptions = []) -> String {
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,10 @@ class PasswordsTableDataSource: NSObject, UITableViewDataSource {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
guard suggestedPasswordsTableEntries.isEmpty, otherPasswordsTableEntries.isEmpty else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
for entry in passwordTableEntries {
|
for entry in passwordTableEntries {
|
||||||
if entry.matches(text) {
|
if entry.matches(text) {
|
||||||
suggestedPasswordsTableEntries.append(entry)
|
suggestedPasswordsTableEntries.append(entry)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue