1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-13 22:00:31 +05:30

Fix search suggestion prefix

This commit is contained in:
Arkadiusz Fal 2022-01-09 15:47:48 +01:00
parent 5050ad5d02
commit 534f356471

View File

@ -30,10 +30,12 @@ struct SearchSuggestions: View {
HStack {
Image(systemName: "magnifyingglass")
HStack(spacing: 0) {
Text(state.suggestionsText)
if suggestion.hasPrefix(state.suggestionsText.lowercased()) {
Text(state.suggestionsText.lowercased())
.lineLimit(1)
.layoutPriority(2)
.foregroundColor(.secondary)
}
Text(querySuffix(suggestion))
.lineLimit(1)