diff options
Diffstat (limited to 'Sora/Views/Post/Grid/PostGridView.swift')
| -rw-r--r-- | Sora/Views/Post/Grid/PostGridView.swift | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Sora/Views/Post/Grid/PostGridView.swift b/Sora/Views/Post/Grid/PostGridView.swift index 47df932..4f7fbd9 100644 --- a/Sora/Views/Post/Grid/PostGridView.swift +++ b/Sora/Views/Post/Grid/PostGridView.swift @@ -200,11 +200,11 @@ struct PostGridView: View { // swiftlint:disable:this type_body_length updateViewState(for: queryID, posts: newPosts) if let scrollID = pendingScrollPosition { - DispatchQueue.main.async { - proxy.scrollTo(scrollID, anchor: .top) + proxy.scrollTo(scrollID, anchor: .top) - pendingScrollPosition = nil - } + pendingScrollPosition = nil + } else { + proxy.scrollTo(queryID, anchor: .top) } } } |