Use AppConfig to get folder URL.

This commit is contained in:
Brent Simmons 2024-06-30 18:04:52 -07:00
parent 7bc980cbd5
commit b403a005f7
3 changed files with 4 additions and 7 deletions

View File

@ -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)")

View File

@ -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")

View File

@ -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<String>() // 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