diff --git a/StikJIT/Utilities/AppStoreIconFetcher.swift b/StikJIT/Utilities/AppStoreIconFetcher.swift index c093386a..6542d514 100644 --- a/StikJIT/Utilities/AppStoreIconFetcher.swift +++ b/StikJIT/Utilities/AppStoreIconFetcher.swift @@ -19,15 +19,19 @@ class AppStoreIconFetcher { return } - iconFetchDispatchQueue.sync { + iconFetchDispatchQueue.async { do { let ans = try JITEnableContext.shared.getAppIcon(withBundleId: bundleID) - iconCache[bundleID] = ans - completion(ans) + DispatchQueue.main.async { + iconCache[bundleID] = ans + completion(ans) + } } catch { print("Failed to get icon: \(error)") - completion(nil) + DispatchQueue.main.async { + completion(nil) + } } } } -} +}