diff options
| author | Fuwn <[email protected]> | 2025-06-14 08:29:44 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-06-14 08:29:44 -0700 |
| commit | 80e67286357d9929f8839e5650875bfed98e47df (patch) | |
| tree | 3f063d5af04cfad1e0ab56af8981e2eaeb6405ff /Sora/Views/Post/Grid/PostGridView.swift | |
| parent | feat: Development commit (diff) | |
| download | sora-testing-80e67286357d9929f8839e5650875bfed98e47df.tar.xz sora-testing-80e67286357d9929f8839e5650875bfed98e47df.zip | |
feat: Development commit
Diffstat (limited to 'Sora/Views/Post/Grid/PostGridView.swift')
| -rw-r--r-- | Sora/Views/Post/Grid/PostGridView.swift | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Sora/Views/Post/Grid/PostGridView.swift b/Sora/Views/Post/Grid/PostGridView.swift index 8e077c3..b665087 100644 --- a/Sora/Views/Post/Grid/PostGridView.swift +++ b/Sora/Views/Post/Grid/PostGridView.swift @@ -9,6 +9,7 @@ struct PostGridView: View { @State private var viewStates: [UUID: PostGridViewState] = [:] @State private var isSearchablePresented = false @State private var cachedSuggestions: [Either<BooruTag, BooruSearchQuery>] = [] + @State private var suppressNextSearchSubmit = false @Environment(\.isSearching) private var isSearching @@ -50,7 +51,8 @@ struct PostGridView: View { if settings.searchSuggestionsMode != .disabled { SearchSuggestionsView( items: searchSuggestionsItems(), - searchText: $manager.searchText + searchText: $manager.searchText, + suppressNextSearchSubmit: $suppressNextSearchSubmit ) } } @@ -62,6 +64,12 @@ struct PostGridView: View { } } .onSubmit(of: .search) { + if suppressNextSearchSubmit { + suppressNextSearchSubmit = false + + return + } + manager.performSearch(settings: settings) } .navigationDestination(for: BooruPost.self) { post in |