summaryrefslogtreecommitdiff
path: root/Sora/Views/Post/Grid/PostGridView.swift
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-03-15 05:38:13 -0700
committerFuwn <[email protected]>2025-03-15 05:38:13 -0700
commit704bb9be1d4bdd8b9360fc1d58d6b58bc2c1d9c1 (patch)
tree60090b645c7c7cebd58e55444a3037dac435f72a /Sora/Views/Post/Grid/PostGridView.swift
parentfeat: Development commit (diff)
downloadsora-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.swift16
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)")
+ }
+ }
+ )
}
}