From 76d3478ed4b388ccb2fdcba67bbe91d6c9e3849c Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Tue, 17 May 2022 11:13:30 -0700 Subject: [PATCH] update fetch results when network request fails --- .../OmnivoreKit/Sources/App/Views/Home/HomeFeedViewModel.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewModel.swift b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewModel.swift index dbd4943f3..797f3973d 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewModel.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewModel.swift @@ -97,8 +97,11 @@ import Views receivedIdx = thisSearchIdx cursor = queryResult.cursor await dataService.prefetchPages(itemIDs: newItems.map(\.unwrappedID)) + } else { + updateFetchController(dataService: dataService) } + isLoading = false showLoadingBar = false }