mirror of
https://github.com/kiwix/kiwix-apple.git
synced 2025-09-24 04:03:03 -04:00
Update search for New ZIM files, to search in descriptions as well
This commit is contained in:
parent
f2b137232c
commit
5dd7a08210
@ -103,7 +103,12 @@ struct ZimFilesNew: View {
|
||||
predicates.append(NSPredicate(format: "created > %@", aMonthAgo as CVarArg))
|
||||
}
|
||||
if !searchText.isEmpty {
|
||||
predicates.append(NSPredicate(format: "name CONTAINS[cd] %@", searchText))
|
||||
predicates.append(
|
||||
NSCompoundPredicate(orPredicateWithSubpredicates: [
|
||||
NSPredicate(format: "name CONTAINS[cd] %@", searchText),
|
||||
NSPredicate(format: "fileDescription CONTAINS[cd] %@", searchText)
|
||||
])
|
||||
)
|
||||
}
|
||||
return NSCompoundPredicate(andPredicateWithSubpredicates: predicates)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user