diff options
| author | Fuwn <[email protected]> | 2025-03-15 05:38:13 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-03-15 05:38:13 -0700 |
| commit | 704bb9be1d4bdd8b9360fc1d58d6b58bc2c1d9c1 (patch) | |
| tree | 60090b645c7c7cebd58e55444a3037dac435f72a /Sora/Views/Post/Grid/PostGridView.swift | |
| parent | feat: Development commit (diff) | |
| download | sora-testing-704bb9be1d4bdd8b9360fc1d58d6b58bc2c1d9c1.tar.xz sora-testing-704bb9be1d4bdd8b9360fc1d58d6b58bc2c1d9c1.zip | |
feat: Development commit
Diffstat (limited to 'Sora/Views/Post/Grid/PostGridView.swift')
| -rw-r--r-- | Sora/Views/Post/Grid/PostGridView.swift | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Sora/Views/Post/Grid/PostGridView.swift b/Sora/Views/Post/Grid/PostGridView.swift index dc6546d..6d1d198 100644 --- a/Sora/Views/Post/Grid/PostGridView.swift +++ b/Sora/Views/Post/Grid/PostGridView.swift @@ -111,6 +111,22 @@ struct PostGridView: View { ) .frame(minHeight: 250) } + .gesture( + DragGesture() + .onEnded { value in + if value.startLocation.x < 50 && value.translation.width > 100 { + manager.goBackInHistory() + debugPrint("ContentView: Swipe left, \(manager.searchHistory)") + } + + if value.startLocation.x > (UIScreen.main.bounds.width - 50) + && value.translation.width < -100 + { + manager.goForwardInHistory() + debugPrint("ContentView: Swipe right, \(manager.searchHistory)") + } + } + ) } } |