diff options
Diffstat (limited to 'Sora/Views/Post/Grid/PostGridView.swift')
| -rw-r--r-- | Sora/Views/Post/Grid/PostGridView.swift | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Sora/Views/Post/Grid/PostGridView.swift b/Sora/Views/Post/Grid/PostGridView.swift index a643391..0921c2e 100644 --- a/Sora/Views/Post/Grid/PostGridView.swift +++ b/Sora/Views/Post/Grid/PostGridView.swift @@ -4,6 +4,7 @@ import WaterfallGrid struct PostGridView: View { @EnvironmentObject var settings: SettingsManager @EnvironmentObject var manager: BooruManager + @State private var isSearchHistoryPresented = false @Environment(\.isSearching) private var isSearching @@ -84,6 +85,12 @@ struct PostGridView: View { .disabled(manager.isLoading) } + ToolbarItem(placement: .bottomBar) { + Button(action: { Task { isSearchHistoryPresented.toggle() } }) { + Label("Search History", systemImage: "clock.arrow.circlepath") + } + } + if manager.isLoading { ToolbarItem { ProgressView() @@ -104,6 +111,9 @@ struct PostGridView: View { await manager.fetchPosts(page: 1, tags: manager.tags, replace: true) } .scrollDisabled(manager.isLoading) + .sheet(isPresented: $isSearchHistoryPresented) { + PostGridSearchHistoryView(selectedTab: .constant(0)) + } } } |