Fix crash on loading App Store search results

This commit is contained in:
relikd
2020-09-08 11:52:07 +02:00
parent 6409e5eaf3
commit fb680d669b
4 changed files with 51 additions and 27 deletions

View File

@@ -98,9 +98,7 @@ struct BundleIcon {
return img
}
static func download(_ bundleId: String, urlStr: String, whenDone: @escaping () -> Void) {
if let url = URL(string: urlStr) {
url.download(to: local(bundleId), onSuccess: whenDone)
}
static func download(_ bundleId: String, url: URL, whenDone: @escaping () -> Void) -> URLSessionDownloadTask {
return url.download(to: local(bundleId), onSuccess: whenDone)
}
}