From e42fa12dafe264c665d2574c93b54ddafe7f2e1f Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sat, 22 Feb 2025 00:07:44 -0800 Subject: feat: Development commit --- Sora/Views/SearchSuggestionsView.swift | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'Sora/Views/SearchSuggestionsView.swift') diff --git a/Sora/Views/SearchSuggestionsView.swift b/Sora/Views/SearchSuggestionsView.swift index b9c3133..91f1f77 100644 --- a/Sora/Views/SearchSuggestionsView.swift +++ b/Sora/Views/SearchSuggestionsView.swift @@ -1,21 +1,23 @@ import SwiftUI struct SearchSuggestionsView: View { - var tags: [BooruTag] - @Binding var searchText: String - var lastSearchTag: String { - String(searchText.split(separator: " ").last ?? "") - } + var tags: [BooruTag] + @Binding var searchText: String + var lastSearchTag: String { + String(searchText.split(separator: " ").last ?? "") + } - var body: some View { - ForEach( - tags.filter { $0.name.lowercased().contains(lastSearchTag) - }) { suggestion in - Button { - searchText.replaceSubrange(searchText.range(of: lastSearchTag)!, with: suggestion.name) - } label: { - Text(suggestion.name) - } - } + var body: some View { + ForEach( + tags.filter { + $0.name.lowercased().contains(lastSearchTag) + } + ) { suggestion in + Button { + searchText.replaceSubrange(searchText.range(of: lastSearchTag)!, with: suggestion.name) + } label: { + Text(suggestion.name) + } } + } } -- cgit v1.2.3