Merge pull request #103 from jordoh/search-in-directory

Include directory in "All" scope searches
This commit is contained in:
Yishi Lin 2017-06-23 22:24:42 +08:00 committed by GitHub
commit a5b9b74dae

View file

@ -456,7 +456,8 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
switch scope {
case "All":
filteredPasswordsTableEntries = passwordsTableAllEntries.filter { entry in
return entry.title.lowercased().contains(searchText.lowercased())
let name = entry.passwordEntity?.nameWithCategory ?? entry.title
return name.localizedCaseInsensitiveContains(searchText)
}
if searchController.isActive && searchController.searchBar.text != "" {
reloadTableView(data: filteredPasswordsTableEntries)