Merge pull request #60 from yoshisuga/yoshisuga/app-icon-fetch-fix

App List: Use async on dispatch queue to prevent stuttering
This commit is contained in:
Stephen 2025-04-01 11:49:13 -04:00 • committed by GitHub
commit 81e48be4a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)
}
}
}
}
}
}