From c7135596e8431fef223cddd28fcc411046233615 Mon Sep 17 00:00:00 2001 From: Jordan Phillips Date: Fri, 23 Jun 2017 07:10:11 -0700 Subject: [PATCH] Include directory in "All" scope searches --- pass/Controllers/PasswordsViewController.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pass/Controllers/PasswordsViewController.swift b/pass/Controllers/PasswordsViewController.swift index 2bae84b..5fa05b4 100644 --- a/pass/Controllers/PasswordsViewController.swift +++ b/pass/Controllers/PasswordsViewController.swift @@ -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)