Switch from download to downloadUsingCache where appropriate.

This commit is contained in:
Brent Simmons 2017-11-23 10:29:00 -08:00
parent c9610f1f8e
commit b4ff1785ab
4 changed files with 5 additions and 5 deletions

View File

@ -97,7 +97,7 @@ private extension FaviconDownloader {
urlsBeingDownloaded.insert(faviconURL)
download(url) { (data, response, error) in
downloadUsingCache(url) { (data, response, error) in
self.urlsBeingDownloaded.remove(faviconURL)
if response == nil || !response!.statusIsOK {

View File

@ -21,7 +21,7 @@ struct FaviconURLFinder {
return
}
download(url) { (data, response, error) in
downloadUsingCache(url) { (data, response, error) in
guard let data = data, let response = response, response.statusIsOK else {
callback(nil)

View File

@ -12,7 +12,7 @@ import RSWeb
func downloadTitleForFeed(_ url: URL, _ completionHandler: @escaping (_ title: String?) -> ()) {
download(url) { (data, response, error) in
downloadUsingCache(url) { (data, response, error) in
guard let data = data else {
completionHandler(nil)

View File

@ -124,7 +124,7 @@ private extension FeedFinder {
func downloadInitialFeed(_ initialURL: URL) {
download(initialURL) { (data, response, error) in
downloadUsingCache(initialURL) { (data, response, error) in
self.initialDownloadStatusCode = response?.forcedStatusCode ?? -1
@ -170,7 +170,7 @@ private extension FeedFinder {
continue
}
download(url) { (data, response, error) in
downloadUsingCache(url) { (data, response, error) in
pendingDownloads.remove(oneFeedSpecifier)