From 704bb9be1d4bdd8b9360fc1d58d6b58bc2c1d9c1 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sat, 15 Mar 2025 05:38:13 -0700 Subject: feat: Development commit --- Sora/Views/Post/Grid/PostGridView.swift | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Sora/Views/Post') 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)") + } + } + ) } } -- cgit v1.2.3