mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Improves error handling when fetching multiple sources
Fetching sources is no longer all or nothing. Now if a source cannot be fetched, it won’t prevent other sources from being updated.
This commit is contained in:
@@ -302,13 +302,11 @@ private extension AppDelegate
|
||||
dispatchGroup.enter()
|
||||
|
||||
AppManager.shared.fetchSources() { (result) in
|
||||
fetchSourcesResult = result
|
||||
fetchSourcesResult = result.map { $0.0 }.mapError { $0 as Error }
|
||||
|
||||
do
|
||||
{
|
||||
let sources = try result.get()
|
||||
|
||||
guard let context = sources.first?.managedObjectContext else { return }
|
||||
let (_, context) = try result.get()
|
||||
|
||||
let previousUpdatesFetchRequest = InstalledApp.updatesFetchRequest() as! NSFetchRequest<NSFetchRequestResult>
|
||||
previousUpdatesFetchRequest.includesPendingChanges = false
|
||||
|
||||
Reference in New Issue
Block a user