Exclude TLD when searching host
This commit is contained in:
@@ -237,8 +237,9 @@ extension GroupedDomainDataSource {
|
|||||||
// This is due to `addFilter` calling `reloadData()` before `search.show()` can animate it.
|
// This is due to `addFilter` calling `reloadData()` before `search.show()` can animate it.
|
||||||
cellAnimationsGroup()
|
cellAnimationsGroup()
|
||||||
var searchTerm = ""
|
var searchTerm = ""
|
||||||
|
let len = parent?.count ?? 0
|
||||||
pipeline.addFilter("search") {
|
pipeline.addFilter("search") {
|
||||||
$0.domain.lowercased().contains(searchTerm)
|
$0.domain.prefix($0.domain.count - len).lowercased().contains(searchTerm)
|
||||||
}
|
}
|
||||||
search.show(onHide: { [unowned self] in
|
search.show(onHide: { [unowned self] in
|
||||||
self.pipeline.removeFilter(withId: "search")
|
self.pipeline.removeFilter(withId: "search")
|
||||||
|
|||||||
Reference in New Issue
Block a user