Format code with SwiftFormat
This commit is contained in:
parent
4d6c77371d
commit
ad4ed9419e
16 changed files with 49 additions and 49 deletions
|
|
@ -11,7 +11,7 @@ import passKit
|
|||
|
||||
class CredentialProviderViewController: ASCredentialProviderViewController {
|
||||
var passcodelock: PasscodeExtensionDisplay {
|
||||
PasscodeExtensionDisplay(extensionContext: self.extensionContext)
|
||||
PasscodeExtensionDisplay(extensionContext: extensionContext)
|
||||
}
|
||||
|
||||
var embeddedNavigationController: UINavigationController {
|
||||
|
|
@ -62,7 +62,7 @@ class CredentialProviderViewController: ASCredentialProviderViewController {
|
|||
|
||||
@objc
|
||||
private func cancel(_: AnyObject?) {
|
||||
self.extensionContext.cancelRequest(withError: NSError(domain: "PassExtension", code: 0))
|
||||
extensionContext.cancelRequest(withError: NSError(domain: "PassExtension", code: 0))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@
|
|||
// Copyright © 2020 Bob Sun. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import AuthenticationServices
|
||||
import passKit
|
||||
import UIKit
|
||||
|
||||
class PasswordsViewController: UIViewController {
|
||||
@IBOutlet var tableView: UITableView!
|
||||
|
|
@ -70,6 +70,6 @@ extension PasswordsViewController: UITableViewDelegate {
|
|||
tableView.deselectRow(at: indexPath, animated: true)
|
||||
let entry = dataSource.tableEntry(at: indexPath)
|
||||
UIImpactFeedbackGenerator(style: .medium).impactOccurred()
|
||||
self.selectionDelegate?.selected(password: entry)
|
||||
selectionDelegate?.selected(password: entry)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
// Copyright © 2020 Bob Sun. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import passKit
|
||||
import UIKit
|
||||
|
||||
class PasswordsTableDataSource: NSObject, UITableViewDataSource {
|
||||
var passwordTableEntries: [PasswordTableEntry]
|
||||
|
|
@ -18,13 +18,13 @@ class PasswordsTableDataSource: NSObject, UITableViewDataSource {
|
|||
var showSuggestion: Bool = false
|
||||
|
||||
init(entries: [PasswordTableEntry] = []) {
|
||||
passwordTableEntries = entries
|
||||
filteredPasswordsTableEntries = passwordTableEntries
|
||||
suggestedPasswordsTableEntries = []
|
||||
otherPasswordsTableEntries = []
|
||||
self.passwordTableEntries = entries
|
||||
self.filteredPasswordsTableEntries = passwordTableEntries
|
||||
self.suggestedPasswordsTableEntries = []
|
||||
self.otherPasswordsTableEntries = []
|
||||
}
|
||||
|
||||
func numberOfSections(in tableView: UITableView) -> Int {
|
||||
func numberOfSections(in _: UITableView) -> Int {
|
||||
if !showSuggestion {
|
||||
return 1
|
||||
} else {
|
||||
|
|
@ -32,11 +32,11 @@ class PasswordsTableDataSource: NSObject, UITableViewDataSource {
|
|||
}
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
func tableView(_: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
tableEntries(at: section).count
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
|
||||
func tableView(_: UITableView, titleForHeaderInSection section: Int) -> String? {
|
||||
if suggestedPasswordsTableEntries.isEmpty {
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue