summaryrefslogtreecommitdiff
path: root/Sora/Views/Post/Grid/PostGridView.swift
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-02-28 03:27:07 -0800
committerFuwn <[email protected]>2025-02-28 03:27:07 -0800
commitd4fd7e8d5f75f1ac7718aac6c1299c3ff740de75 (patch)
treedfd4776c3a1bbe3b448310f9572d5949c80695a5 /Sora/Views/Post/Grid/PostGridView.swift
parentfeat: Development commit (diff)
downloadsora-testing-d4fd7e8d5f75f1ac7718aac6c1299c3ff740de75.tar.xz
sora-testing-d4fd7e8d5f75f1ac7718aac6c1299c3ff740de75.zip
feat: Development commit
Diffstat (limited to 'Sora/Views/Post/Grid/PostGridView.swift')
-rw-r--r--Sora/Views/Post/Grid/PostGridView.swift10
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))
+ }
}
}