Create and use shared initializeDownloaders AppDelegate function.

This commit is contained in:
Brent Simmons 2024-06-30 18:14:01 -07:00
parent e990b7aab1
commit ada9818541
2 changed files with 8 additions and 3 deletions

View File

@ -149,8 +149,7 @@ import Sparkle
CacheCleaner.purgeIfNecessary()
FaviconDownloader.shared.delegate = self
FeedIconDownloader.shared.delegate = self
initializeDownloaders()
}
func applicationDidFinishLaunching(_ note: Notification) {

View File

@ -20,4 +20,10 @@ extension AppDelegate: FaviconDownloaderDelegate, FeedIconDownloaderDelegate {
await HTMLMetadataDownloader.downloadMetadata(for: url)
}
func initializeDownloaders() {
FaviconDownloader.shared.delegate = self
FeedIconDownloader.shared.delegate = self
}
}