diff --git a/pass/Services/PasswordNavigationDataSource.swift b/pass/Services/PasswordNavigationDataSource.swift index 72b283f..4d2ea5a 100644 --- a/pass/Services/PasswordNavigationDataSource.swift +++ b/pass/Services/PasswordNavigationDataSource.swift @@ -68,7 +68,7 @@ class PasswordNavigationDataSource: NSObject, UITableViewDataSource { } filteredSections = sections.map { section in - let entries = section.entries.filter { $0.match(text) } + let entries = section.entries.filter { $0.matches(text) } return Section(title: section.title, entries: entries) } .filter { !$0.entries.isEmpty } diff --git a/passAutoFillExtension/Controllers/CredentialProviderViewController.swift b/passAutoFillExtension/Controllers/CredentialProviderViewController.swift index b6f8039..8150bcd 100644 --- a/passAutoFillExtension/Controllers/CredentialProviderViewController.swift +++ b/passAutoFillExtension/Controllers/CredentialProviderViewController.swift @@ -39,7 +39,7 @@ class CredentialProviderViewController: ASCredentialProviderViewController { credentialProvider.identifier = serviceIdentifiers.first let url = serviceIdentifiers.first.flatMap { URL(string: $0.identifier) } passwordsViewController.navigationItem.prompt = url?.host - passwordsViewController.showPasswordsWithSuggstion(matching: url?.host ?? "") + passwordsViewController.showPasswordsWithSuggestion(matching: url?.host ?? "") } override func provideCredentialWithoutUserInteraction(for credentialIdentity: ASPasswordCredentialIdentity) { @@ -57,7 +57,7 @@ class CredentialProviderViewController: ASCredentialProviderViewController { } credentialProvider.identifier = credentialIdentity.serviceIdentifier passwordsViewController.navigationItem.prompt = identifier - passwordsViewController.showPasswordsWithSuggstion(matching: identifier) + passwordsViewController.showPasswordsWithSuggestion(matching: identifier) } @objc diff --git a/passAutoFillExtension/Controllers/PasswordsViewController.swift b/passAutoFillExtension/Controllers/PasswordsViewController.swift index 517a5f8..e6c854b 100644 --- a/passAutoFillExtension/Controllers/PasswordsViewController.swift +++ b/passAutoFillExtension/Controllers/PasswordsViewController.swift @@ -43,7 +43,7 @@ class PasswordsViewController: UIViewController { tableView.dataSource = dataSource } - func showPasswordsWithSuggstion(matching text: String) { + func showPasswordsWithSuggestion(matching text: String) { dataSource.showTableEntriesWithSuggestion(matching: text) tableView.reloadData() } diff --git a/passAutoFillExtension/Services/PasswordsTableDataSource.swift b/passAutoFillExtension/Services/PasswordsTableDataSource.swift index 287df42..f59bde4 100644 --- a/passAutoFillExtension/Services/PasswordsTableDataSource.swift +++ b/passAutoFillExtension/Services/PasswordsTableDataSource.swift @@ -61,7 +61,7 @@ class PasswordsTableDataSource: NSObject, UITableViewDataSource { return } - filteredPasswordsTableEntries = passwordTableEntries.filter { $0.match(text) } + filteredPasswordsTableEntries = passwordTableEntries.filter { $0.matches(text) } showSuggestion = false } @@ -73,7 +73,7 @@ class PasswordsTableDataSource: NSObject, UITableViewDataSource { } for entry in passwordTableEntries { - if entry.match(text) { + if entry.matches(text) { suggestedPasswordsTableEntries.append(entry) } else { otherPasswordsTableEntries.append(entry) diff --git a/passExtension/Controllers/ExtensionViewController.swift b/passExtension/Controllers/ExtensionViewController.swift index a39f973..bb64a13 100644 --- a/passExtension/Controllers/ExtensionViewController.swift +++ b/passExtension/Controllers/ExtensionViewController.swift @@ -59,7 +59,7 @@ class ExtensionViewController: UIViewController { func completeTask(_ text: String?) { DispatchQueue.main.async { - self.passwordsViewController.showPasswordsWithSuggstion(matching: text ?? "") + self.passwordsViewController.showPasswordsWithSuggestion(matching: text ?? "") self.passwordsViewController.navigationItem.prompt = text } } diff --git a/passKit/Models/PasswordTableEntry.swift b/passKit/Models/PasswordTableEntry.swift index 047f3ba..3828823 100644 --- a/passKit/Models/PasswordTableEntry.swift +++ b/passKit/Models/PasswordTableEntry.swift @@ -23,7 +23,7 @@ public class PasswordTableEntry: NSObject { self.categoryText = entity.getCategoryText() } - public func match(_ searchText: String) -> Bool { + public func matches(_ searchText: String) -> Bool { PasswordTableEntry.match(nameWithCategory: passwordEntity.nameWithCategory, searchText: searchText) }