summaryrefslogtreecommitdiff
path: root/Sora/Views/Post/Grid/PostGridView.swift
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-03-15 06:00:36 -0700
committerFuwn <[email protected]>2025-03-15 06:00:36 -0700
commit665549a703b4d1d196a7ece52a922cb990d99ce5 (patch)
tree0eeb3e556ccf0b623fa86afb201f5d1c6f0cbaa7 /Sora/Views/Post/Grid/PostGridView.swift
parentfeat: Development commit (diff)
downloadsora-testing-665549a703b4d1d196a7ece52a922cb990d99ce5.tar.xz
sora-testing-665549a703b4d1d196a7ece52a922cb990d99ce5.zip
feat: Development commit
Diffstat (limited to 'Sora/Views/Post/Grid/PostGridView.swift')
-rw-r--r--Sora/Views/Post/Grid/PostGridView.swift40
1 files changed, 40 insertions, 0 deletions
diff --git a/Sora/Views/Post/Grid/PostGridView.swift b/Sora/Views/Post/Grid/PostGridView.swift
index 9a4be18..b359e07 100644
--- a/Sora/Views/Post/Grid/PostGridView.swift
+++ b/Sora/Views/Post/Grid/PostGridView.swift
@@ -106,6 +106,46 @@ struct PostGridView: View {
ToolbarItem(placement: .bottomBar) { PostGridBookmarkButtonView() }
#endif
}
+
+ if manager.historyIndex > 0 {
+ #if os(macOS)
+ ToolbarItem {
+ Button(action: {
+ manager.goBackInHistory()
+ }) {
+ Label("Previous Search", systemImage: "chevron.left")
+ }
+ }
+ #else
+ ToolbarItem(placement: .bottomBar) {
+ Button(action: {
+ manager.goBackInHistory()
+ }) {
+ Label("Previous Search", systemImage: "chevron.left")
+ }
+ }
+ #endif
+ }
+
+ if manager.historyIndex < manager.searchHistory.count - 1 {
+ #if os(macOS)
+ ToolbarItem {
+ Button(action: {
+ manager.goForwardInHistory()
+ }) {
+ Label("Next Search", systemImage: "chevron.right")
+ }
+ }
+ #else
+ ToolbarItem(placement: .bottomBar) {
+ Button(action: {
+ manager.goForwardInHistory()
+ }) {
+ Label("Next Search", systemImage: "chevron.right")
+ }
+ }
+ #endif
+ }
}
.navigationTitle("Posts")
.refreshable {