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)
|
urlsBeingDownloaded.insert(faviconURL)
|
||||||
|
|
||||||
download(url) { (data, response, error) in
|
downloadUsingCache(url) { (data, response, error) in
|
||||||
|
|
||||||
self.urlsBeingDownloaded.remove(faviconURL)
|
self.urlsBeingDownloaded.remove(faviconURL)
|
||||||
if response == nil || !response!.statusIsOK {
|
if response == nil || !response!.statusIsOK {
|
||||||
|
@ -21,7 +21,7 @@ struct FaviconURLFinder {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
download(url) { (data, response, error) in
|
downloadUsingCache(url) { (data, response, error) in
|
||||||
|
|
||||||
guard let data = data, let response = response, response.statusIsOK else {
|
guard let data = data, let response = response, response.statusIsOK else {
|
||||||
callback(nil)
|
callback(nil)
|
||||||
|
@ -12,7 +12,7 @@ import RSWeb
|
|||||||
|
|
||||||
func downloadTitleForFeed(_ url: URL, _ completionHandler: @escaping (_ title: String?) -> ()) {
|
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 {
|
guard let data = data else {
|
||||||
completionHandler(nil)
|
completionHandler(nil)
|
||||||
|
@ -124,7 +124,7 @@ private extension FeedFinder {
|
|||||||
|
|
||||||
func downloadInitialFeed(_ initialURL: URL) {
|
func downloadInitialFeed(_ initialURL: URL) {
|
||||||
|
|
||||||
download(initialURL) { (data, response, error) in
|
downloadUsingCache(initialURL) { (data, response, error) in
|
||||||
|
|
||||||
self.initialDownloadStatusCode = response?.forcedStatusCode ?? -1
|
self.initialDownloadStatusCode = response?.forcedStatusCode ?? -1
|
||||||
|
|
||||||
@ -170,7 +170,7 @@ private extension FeedFinder {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
download(url) { (data, response, error) in
|
downloadUsingCache(url) { (data, response, error) in
|
||||||
|
|
||||||
pendingDownloads.remove(oneFeedSpecifier)
|
pendingDownloads.remove(oneFeedSpecifier)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user