From 1af757409c5cf47b6c515d64c0656759129cd950 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 11 Sep 2025 22:59:04 -0700 Subject: feat: Development commit --- Sora/Views/Post/Grid/PostGridView.swift | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Sora/Views/Post') diff --git a/Sora/Views/Post/Grid/PostGridView.swift b/Sora/Views/Post/Grid/PostGridView.swift index 5c071b8..a5ff85a 100644 --- a/Sora/Views/Post/Grid/PostGridView.swift +++ b/Sora/Views/Post/Grid/PostGridView.swift @@ -240,6 +240,13 @@ struct PostGridView: View { // swiftlint:disable:this type_body_length } } } + .onChange(of: navigationPath) { _, _ in + if initialTag == nil && !manager.isNavigatingHistory && !manager.isLoading { + Task(priority: .userInitiated) { + await manager.fetchPosts(page: 1, tags: manager.tags, replace: true) + } + } + } .onAppear { if let initialTag { if localSearchText.isEmpty || !hasAppearedBefore { @@ -270,6 +277,12 @@ struct PostGridView: View { // swiftlint:disable:this type_body_length } } } + } else { + if !manager.isNavigatingHistory && !manager.isLoading { + Task(priority: .userInitiated) { + await manager.fetchPosts(page: 1, tags: manager.tags, replace: true) + } + } } } .toolbar { -- cgit v1.2.3