summaryrefslogtreecommitdiff
path: root/Sora/Views/SearchSuggestionsView.swift
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-06-14 08:29:44 -0700
committerFuwn <[email protected]>2025-06-14 08:29:44 -0700
commit80e67286357d9929f8839e5650875bfed98e47df (patch)
tree3f063d5af04cfad1e0ab56af8981e2eaeb6405ff /Sora/Views/SearchSuggestionsView.swift
parentfeat: Development commit (diff)
downloadsora-testing-80e67286357d9929f8839e5650875bfed98e47df.tar.xz
sora-testing-80e67286357d9929f8839e5650875bfed98e47df.zip
feat: Development commit
Diffstat (limited to 'Sora/Views/SearchSuggestionsView.swift')
-rw-r--r--Sora/Views/SearchSuggestionsView.swift3
1 files changed, 3 insertions, 0 deletions
diff --git a/Sora/Views/SearchSuggestionsView.swift b/Sora/Views/SearchSuggestionsView.swift
index c5210a6..03af4c6 100644
--- a/Sora/Views/SearchSuggestionsView.swift
+++ b/Sora/Views/SearchSuggestionsView.swift
@@ -8,6 +8,7 @@ struct SearchSuggestionsView: View {
var items: [Either<BooruTag, BooruSearchQuery>]
@Binding var searchText: String
+ @Binding var suppressNextSearchSubmit: Bool
private var lastSearchTag: String {
String(searchText.split(separator: " ").last ?? "").lowercased()
@@ -58,6 +59,7 @@ struct SearchSuggestionsView: View {
Button {
let previousTags = searchText.split(separator: " ").dropLast()
+ suppressNextSearchSubmit = true
searchText = (previousTags.map(String.init) + [tag.name]).joined(separator: " ")
} label: {
Text(tag.name)
@@ -69,6 +71,7 @@ struct SearchSuggestionsView: View {
{
let previousTags = searchText.split(separator: " ").dropLast()
+ suppressNextSearchSubmit = true
searchText = (previousTags.map(String.init) + [matchingTag]).joined(separator: " ")
}
} label: {