mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-25 09:11:13 +01:00
Switch from download to downloadUsingCache where appropriate.
This commit is contained in:
parent
c9610f1f8e
commit
b4ff1785ab
@ -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 {
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user