Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

Commit 7d8bf1b

Browse files
committed
Use localizedCaseInsensitiveContains in history search
1 parent 387691a commit 7d8bf1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DuckDuckGo/History/Services/HistoryViewDataProvider.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ final class HistoryViewDataProvider: HistoryView.DataProviding {
128128
case .rangeFilter(let range):
129129
return groupings.first(where: { $0.range == range })?.visits ?? []
130130
case .searchTerm(let term):
131-
return visits.filter { $0.title.contains(term) || $0.url.contains(term) }
131+
return visits.filter { $0.title.localizedCaseInsensitiveContains(term) || $0.url.localizedCaseInsensitiveContains(term) }
132132
case .domainFilter(let domain):
133133
return visits.filter { URL(string: $0.url)?.host == domain }
134134
}

0 commit comments

Comments
 (0)