diff options
Diffstat (limited to 'Sora/Views')
| -rw-r--r-- | Sora/Views/MainView.swift | 4 | ||||
| -rw-r--r-- | Sora/Views/Post/Grid/PostGridView.swift | 14 |
2 files changed, 8 insertions, 10 deletions
diff --git a/Sora/Views/MainView.swift b/Sora/Views/MainView.swift index 246e7a9..5eeab5c 100644 --- a/Sora/Views/MainView.swift +++ b/Sora/Views/MainView.swift @@ -55,7 +55,7 @@ struct MainView: View { refreshTags() if manager.searchText.isEmpty { - await manager.fetchPosts() + manager.fetchPosts() } else { manager.performSearch(settings: settings) } @@ -69,7 +69,7 @@ struct MainView: View { refreshTags() if manager.posts.isEmpty { - await manager.fetchPosts() + manager.fetchPosts() } } } 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) { |