summaryrefslogtreecommitdiff
path: root/Sora/Views/Post/Grid/PostGridView.swift
diff options
context:
space:
mode:
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 {