From b403a005f7e902de6bfe62617d966c394a0e4a9a Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sun, 30 Jun 2024 18:04:52 -0700 Subject: [PATCH] Use AppConfig to get folder URL. --- Images/Sources/Images/Favicons/FaviconDownloader.swift | 3 +-- Images/Sources/Images/FeedIconDownloader.swift | 3 +-- Images/Sources/Images/ImageDownloader.swift | 5 ++--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Images/Sources/Images/Favicons/FaviconDownloader.swift b/Images/Sources/Images/Favicons/FaviconDownloader.swift index a194d6b0e..31670d7df 100644 --- a/Images/Sources/Images/Favicons/FaviconDownloader.swift +++ b/Images/Sources/Images/Favicons/FaviconDownloader.swift @@ -13,7 +13,6 @@ import Account import UniformTypeIdentifiers import Core import ParserObjC -import AppConfig public extension Notification.Name { static let FaviconDidBecomeAvailable = Notification.Name("FaviconDidBecomeAvailableNotification") // userInfo key: FaviconDownloader.UserInfoKey.faviconURL @@ -65,7 +64,7 @@ public protocol FaviconDownloaderDelegate { public init() { - self.folder = AppLocations.faviconsFolder + self.folder = AppConfig.cacheSubfolder(named: "Favicons") self.diskCache = BinaryDiskCache(folder: folder.path) self.queue = DispatchQueue(label: "FaviconDownloader serial queue - \(folder)") diff --git a/Images/Sources/Images/FeedIconDownloader.swift b/Images/Sources/Images/FeedIconDownloader.swift index b9e9eb4c3..35066ff42 100644 --- a/Images/Sources/Images/FeedIconDownloader.swift +++ b/Images/Sources/Images/FeedIconDownloader.swift @@ -13,7 +13,6 @@ import Web import Parser import ParserObjC import Core -import AppConfig public extension Notification.Name { @@ -73,7 +72,7 @@ public protocol FeedIconDownloaderDelegate: Sendable { public init() { - let folder = AppLocations.feedIconsFolder + let folder = AppConfig.cacheSubfolder(named: "FeedIcons") self.feedURLToIconURLCachePath = folder.appendingPathComponent("FeedURLToIconURLCache.plist") self.homePageToIconURLCachePath = folder.appendingPathComponent("HomePageToIconURLCache.plist") diff --git a/Images/Sources/Images/ImageDownloader.swift b/Images/Sources/Images/ImageDownloader.swift index 2159ba9f9..716aff7fa 100644 --- a/Images/Sources/Images/ImageDownloader.swift +++ b/Images/Sources/Images/ImageDownloader.swift @@ -11,7 +11,6 @@ import os.log import Web import FoundationExtras import Core -import AppConfig public extension Notification.Name { @@ -32,8 +31,8 @@ public extension Notification.Name { private var badURLs = Set() // That return a 404 or whatever. Just skip them in the future. init() { - let folder = AppLocations.imagesFolder.path - self.diskCache = BinaryDiskCache(folder: folder) + let folder = AppConfig.cacheSubfolder(named: "Images") + self.diskCache = BinaryDiskCache(folder: folder.path) } @discardableResult