summaryrefslogtreecommitdiff
path: root/Sora/Views
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-07-10 08:13:27 -0700
committerFuwn <[email protected]>2025-07-10 08:13:27 -0700
commitf082862e0804d93f856b8867271848004c2047b9 (patch)
tree01099ed48c053e243267d3d58f47804e7606d182 /Sora/Views
parentfeat: Development commit (diff)
downloadsora-testing-f082862e0804d93f856b8867271848004c2047b9.tar.xz
sora-testing-f082862e0804d93f856b8867271848004c2047b9.zip
feat: Development commit
Diffstat (limited to 'Sora/Views')
-rw-r--r--Sora/Views/Post/Grid/PostGridView.swift20
1 files changed, 15 insertions, 5 deletions
diff --git a/Sora/Views/Post/Grid/PostGridView.swift b/Sora/Views/Post/Grid/PostGridView.swift
index be56286..192b40f 100644
--- a/Sora/Views/Post/Grid/PostGridView.swift
+++ b/Sora/Views/Post/Grid/PostGridView.swift
@@ -119,7 +119,7 @@ struct PostGridView: View { // swiftlint:disable:this type_body_length
}
}
.id(queryID)
- .animation(.easeInOut, value: manager.historyIndex)
+ .transition(.opacity)
}
.scrollPosition(id: scrollPosition)
#if os(iOS)
@@ -290,7 +290,9 @@ struct PostGridView: View { // swiftlint:disable:this type_body_length
} label: {
Label("Previous Search", systemImage: "chevron.left")
} primaryAction: {
- manager.goBackInHistory()
+ withAnimation {
+ manager.goBackInHistory()
+ }
}
.disabled(!manager.canGoBackInHistory)
}
@@ -310,7 +312,9 @@ struct PostGridView: View { // swiftlint:disable:this type_body_length
} label: {
Label("Next Search", systemImage: "chevron.right")
} primaryAction: {
- manager.goForwardInHistory()
+ withAnimation {
+ manager.goForwardInHistory()
+ }
}
.disabled(!manager.canGoForwardInHistory)
}
@@ -334,14 +338,20 @@ struct PostGridView: View { // swiftlint:disable:this type_body_length
DragGesture()
.onEnded { value in
if value.startLocation.x < 50 && value.translation.width > 100 {
- manager.goBackInHistory()
+ withAnimation {
+ manager.goBackInHistory()
+ }
+
debugPrint("ContentView: Swipe left, \(manager.searchHistory)")
}
if value.startLocation.x > (UIScreen.main.bounds.width - 50)
&& value.translation.width < -100
{
- manager.goForwardInHistory()
+ withAnimation {
+ manager.goForwardInHistory()
+ }
+
debugPrint("ContentView: Swipe right, \(manager.searchHistory)")
}
}