sort password entities case insensitive
This commit is contained in:
parent
c0edb7d336
commit
e3fb4591f9
1 changed files with 1 additions and 3 deletions
|
|
@ -149,9 +149,7 @@ class PasswordStore {
|
|||
let passwordEntityFetch = NSFetchRequest<NSFetchRequestResult>(entityName: "PasswordEntity")
|
||||
do {
|
||||
let fetchedPasswordEntities = try context.fetch(passwordEntityFetch) as! [PasswordEntity]
|
||||
return fetchedPasswordEntities.sorted(by: { (p1, p2) -> Bool in
|
||||
return p1.name! < p2.name!;
|
||||
})
|
||||
return fetchedPasswordEntities.sorted { $0.name!.caseInsensitiveCompare($1.name!) == .orderedAscending }
|
||||
} catch {
|
||||
fatalError("Failed to fetch employees: \(error)")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue