diff options
| author | Fuwn <[email protected]> | 2025-07-11 08:15:07 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-07-11 08:15:07 -0700 |
| commit | 5524b73727d51c9c5872ce592c4d6398cb07c01c (patch) | |
| tree | 2f3a8030f947971280b0949645b19cb724916e7a /Sora/Views/Post | |
| parent | feat: Development commit (diff) | |
| download | sora-testing-5524b73727d51c9c5872ce592c4d6398cb07c01c.tar.xz sora-testing-5524b73727d51c9c5872ce592c4d6398cb07c01c.zip | |
feat: Development commit
Diffstat (limited to 'Sora/Views/Post')
| -rw-r--r-- | Sora/Views/Post/Grid/PostGridView.swift | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/Sora/Views/Post/Grid/PostGridView.swift b/Sora/Views/Post/Grid/PostGridView.swift index 0eeb893..c57e296 100644 --- a/Sora/Views/Post/Grid/PostGridView.swift +++ b/Sora/Views/Post/Grid/PostGridView.swift @@ -32,19 +32,6 @@ struct PostGridView: View { // swiftlint:disable:this type_body_length .filter { settings.displayRatings.contains($0.rating) } ?? [] } - private var scrollPosition: Binding<BooruPost.ID?> { - Binding( - get: { - viewStates[queryID]?.scrollPosition - }, - set: { newPosition in - if viewStates[queryID] != nil { - viewStates[queryID]?.scrollPosition = newPosition - } - } - ) - } - var body: some View { ScrollView { Group { @@ -121,7 +108,6 @@ struct PostGridView: View { // swiftlint:disable:this type_body_length .id(queryID) .transition(.opacity) } - .scrollPosition(id: scrollPosition) #if os(iOS) .searchable( text: $manager.searchText, @@ -209,10 +195,6 @@ struct PostGridView: View { // swiftlint:disable:this type_body_length manager.posts = state.posts manager.currentPage = state.currentPage manager.selectedPost = state.selectedPost - - DispatchQueue.main.async { - scrollPosition.wrappedValue = state.scrollPosition - } } else { manager.posts = [] manager.currentPage = 1 @@ -396,7 +378,6 @@ struct PostGridView: View { // swiftlint:disable:this type_body_length currentPage: Int? = nil, selectedPost: BooruPost? = nil, resetSelectedPost: Bool = false, - scrollPosition: BooruPost.ID? = nil ) { let wasNewlyCreated = viewStates[queryID] == nil var state = viewStates[queryID] ?? PostGridViewState() @@ -411,10 +392,6 @@ struct PostGridView: View { // swiftlint:disable:this type_body_length state.selectedPost = nil } - if let scrollPosition { - state.scrollPosition = scrollPosition - } - viewStates[queryID] = state if wasNewlyCreated { |