diff options
Diffstat (limited to 'Sora/Views/Post/Grid')
| -rw-r--r-- | Sora/Views/Post/Grid/PostGridView.swift | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Sora/Views/Post/Grid/PostGridView.swift b/Sora/Views/Post/Grid/PostGridView.swift index 025c3d2..5c071b8 100644 --- a/Sora/Views/Post/Grid/PostGridView.swift +++ b/Sora/Views/Post/Grid/PostGridView.swift @@ -253,11 +253,13 @@ struct PostGridView: View { // swiftlint:disable:this type_body_length await performLocalSearch() } } else { - let currentTags = localSearchText.components(separatedBy: .whitespaces).filter { !$0.isEmpty } + let currentTags = localSearchText.components(separatedBy: .whitespaces).filter { tag in + !tag.isEmpty + } let hasPosts = !localPosts.isEmpty let initialTags = initialTag.components(separatedBy: .whitespaces).filter { !$0.isEmpty } let needsFetch = !hasPosts || currentTags != initialTags - + if needsFetch { currentLocalTask = Task(priority: .userInitiated) { await fetchLocalPosts( |