diff options
| author | Fuwn <[email protected]> | 2025-03-18 04:44:08 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-03-18 04:44:08 -0700 |
| commit | 82b9b4aa5a9e547acd8b7c64c25d5770150d5392 (patch) | |
| tree | 5039946d5de0362ce497b698e1290b32c75308cc /Sora/Views/Post/Grid/PostGridView.swift | |
| parent | feat: Development commit (diff) | |
| download | sora-testing-82b9b4aa5a9e547acd8b7c64c25d5770150d5392.tar.xz sora-testing-82b9b4aa5a9e547acd8b7c64c25d5770150d5392.zip | |
feat: Development commit
Diffstat (limited to 'Sora/Views/Post/Grid/PostGridView.swift')
| -rw-r--r-- | Sora/Views/Post/Grid/PostGridView.swift | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Sora/Views/Post/Grid/PostGridView.swift b/Sora/Views/Post/Grid/PostGridView.swift index 8e5e1a7..3a1fcd3 100644 --- a/Sora/Views/Post/Grid/PostGridView.swift +++ b/Sora/Views/Post/Grid/PostGridView.swift @@ -45,7 +45,7 @@ struct PostGridView: View { PostDetailsView(post: post) } .onChange(of: manager.searchText) { _, _ in - if manager.searchText.isEmpty, !isSearching { + if manager.searchText.isEmpty, !isSearching, !manager.isNavigatingHistory { Task { manager.performSearch() } } } @@ -92,14 +92,14 @@ struct PostGridView: View { Button(action: { manager.goBackInHistory() }) { Label("Previous Search", systemImage: "chevron.left") } - .disabled(!(manager.historyIndex > 0)) + .disabled(!manager.canGoBackInHistory) } PlatformSpecificToolbarItem { Button(action: { manager.goForwardInHistory() }) { Label("Next Search", systemImage: "chevron.right") } - .disabled(!(manager.historyIndex < manager.searchHistory.count - 1)) + .disabled(!manager.canGoForwardInHistory) } } .navigationTitle("Posts") |