diff options
| author | Fuwn <[email protected]> | 2025-02-28 03:46:41 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-02-28 03:46:41 -0800 |
| commit | 93fd5a0f53ab9dc30a04f758e17b5c7363f531fe (patch) | |
| tree | 0a164c694668c26964332785295ab6e219e374e4 /Sora/Views/Post/Grid/PostGridSearchHistoryView.swift | |
| parent | feat: Development commit (diff) | |
| download | sora-testing-93fd5a0f53ab9dc30a04f758e17b5c7363f531fe.tar.xz sora-testing-93fd5a0f53ab9dc30a04f758e17b5c7363f531fe.zip | |
feat: Development commit
Diffstat (limited to 'Sora/Views/Post/Grid/PostGridSearchHistoryView.swift')
| -rw-r--r-- | Sora/Views/Post/Grid/PostGridSearchHistoryView.swift | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Sora/Views/Post/Grid/PostGridSearchHistoryView.swift b/Sora/Views/Post/Grid/PostGridSearchHistoryView.swift index 2f95118..2816d35 100644 --- a/Sora/Views/Post/Grid/PostGridSearchHistoryView.swift +++ b/Sora/Views/Post/Grid/PostGridSearchHistoryView.swift @@ -5,6 +5,7 @@ struct PostGridSearchHistoryView: View { @EnvironmentObject private var settings: SettingsManager @State private var searchText: String = "" @Binding var selectedTab: Int + @Binding var isPresented: Bool var filteredHistory: [BooruSearchQuery] { guard !searchText.isEmpty else { @@ -43,6 +44,8 @@ struct PostGridSearchHistoryView: View { manager.searchText = query.tags.joined(separator: " ") selectedTab = 0 + isPresented.toggle() + if previousProvider == settings.preferredBooru { manager.performSearch() } @@ -70,7 +73,10 @@ struct PostGridSearchHistoryView: View { } #Preview { - PostGridSearchHistoryView(selectedTab: .constant(0)) + PostGridSearchHistoryView( + selectedTab: .constant(0), + isPresented: .constant(true) + ) .environmentObject(SettingsManager()) .environmentObject(BooruManager(.safebooru)) } |