From 84c62eae547f96072b3544c5cb95dedd595a5c96 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Tue, 26 Dec 2023 14:32:36 +0800 Subject: [PATCH] Dont prefetch sync update pages --- .../Views/Home/Components/LibrarySyncManager.swift | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/Components/LibrarySyncManager.swift b/apple/OmnivoreKit/Sources/App/Views/Home/Components/LibrarySyncManager.swift index bb4e72709..f14d174b0 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/Components/LibrarySyncManager.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/Components/LibrarySyncManager.swift @@ -4,7 +4,7 @@ import Services class LibrarySyncManager { var syncCursor: String? - func syncItems(dataService: DataService) async { + func syncUpdates(dataService: DataService) async { let syncStart = Date.now let lastSyncDate = dataService.lastItemSyncTime @@ -26,15 +26,5 @@ class LibrarySyncManager { } else { dataService.lastItemSyncTime = syncStart } - - // If possible start prefetching new pages in the background - if - let itemIDs = syncResult?.updatedItemIDs, - !itemIDs.isEmpty - { - Task.detached(priority: .background) { - await dataService.prefetchPages(itemIDs: itemIDs, username: "username") - } - } } }