summaryrefslogtreecommitdiff
path: root/Sora/Views/Post/Grid/PostGridView.swift
diff options
context:
space:
mode:
Diffstat (limited to 'Sora/Views/Post/Grid/PostGridView.swift')
-rw-r--r--Sora/Views/Post/Grid/PostGridView.swift14
1 files changed, 6 insertions, 8 deletions
diff --git a/Sora/Views/Post/Grid/PostGridView.swift b/Sora/Views/Post/Grid/PostGridView.swift
index ecaa971..ca3338e 100644
--- a/Sora/Views/Post/Grid/PostGridView.swift
+++ b/Sora/Views/Post/Grid/PostGridView.swift
@@ -89,13 +89,11 @@ struct PostGridView: View {
manager.posts = []
manager.currentPage = 1
- Task {
- await manager.fetchPosts(
- page: 1,
- tags: manager.searchHistory[newIndex].tags,
- replace: true
- )
- }
+ manager.fetchPosts(
+ page: 1,
+ tags: manager.searchHistory[newIndex].tags,
+ replace: true
+ )
}
}
.toolbar {
@@ -156,7 +154,7 @@ struct PostGridView: View {
.navigationTitle("Posts")
.refreshable {
manager.clearCachedPages()
- await manager.fetchPosts(page: 1, tags: manager.tags, replace: true)
+ manager.fetchPosts(page: 1, tags: manager.tags, replace: true)
}
.scrollDisabled(manager.isLoading)
.sheet(isPresented: $isSearchHistoryPresented) {