diff options
| author | Fuwn <[email protected]> | 2025-03-15 06:00:36 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-03-15 06:00:36 -0700 |
| commit | 665549a703b4d1d196a7ece52a922cb990d99ce5 (patch) | |
| tree | 0eeb3e556ccf0b623fa86afb201f5d1c6f0cbaa7 /Sora/Views/Post/Grid/PostGridView.swift | |
| parent | feat: Development commit (diff) | |
| download | sora-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.swift | 40 |
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 { |