mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Remove unused delegates.
This commit is contained in:
@@ -18,11 +18,6 @@ public extension Notification.Name {
|
||||
static let FaviconDidBecomeAvailable = Notification.Name("FaviconDidBecomeAvailableNotification") // userInfo key: FaviconDownloader.UserInfoKey.faviconURL
|
||||
}
|
||||
|
||||
public protocol FaviconDownloaderDelegate {
|
||||
|
||||
@MainActor var appIconImage: IconImage? { get }
|
||||
}
|
||||
|
||||
@MainActor public final class FaviconDownloader {
|
||||
|
||||
public static let shared = FaviconDownloader()
|
||||
@@ -56,8 +51,6 @@ public protocol FaviconDownloaderDelegate {
|
||||
private let queue: DispatchQueue
|
||||
private var cache = [Feed: IconImage]() // faviconURL: RSImage
|
||||
|
||||
public var delegate: FaviconDownloaderDelegate?
|
||||
|
||||
struct UserInfoKey {
|
||||
static let faviconURL = "faviconURL"
|
||||
}
|
||||
@@ -132,7 +125,7 @@ public protocol FaviconDownloaderDelegate {
|
||||
|
||||
if let url = URL(string: homePageURL) {
|
||||
if url.host == "nnw.ranchero.com" || url.host == "netnewswire.blog" {
|
||||
return delegate?.appIconImage
|
||||
return IconImage.appIcon
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,11 +18,6 @@ public extension Notification.Name {
|
||||
static let FeedIconDidBecomeAvailable = Notification.Name("FeedIconDidBecomeAvailableNotification") // UserInfoKey.feed
|
||||
}
|
||||
|
||||
public protocol FeedIconDownloaderDelegate: Sendable {
|
||||
|
||||
@MainActor var appIconImage: IconImage? { get }
|
||||
}
|
||||
|
||||
@MainActor public final class FeedIconDownloader {
|
||||
|
||||
public static let shared = FeedIconDownloader()
|
||||
@@ -64,8 +59,6 @@ public protocol FeedIconDownloaderDelegate: Sendable {
|
||||
private var urlsInProgress = Set<String>()
|
||||
private var cache = [Feed: IconImage]()
|
||||
private var waitingForFeedURLs = [String: Feed]()
|
||||
|
||||
public var delegate: FeedIconDownloaderDelegate?
|
||||
|
||||
public init() {
|
||||
|
||||
@@ -91,7 +84,7 @@ public protocol FeedIconDownloaderDelegate: Sendable {
|
||||
}
|
||||
|
||||
if let hpURLString = feed.homePageURL, let hpURL = URL(string: hpURLString), (hpURL.host == "nnw.ranchero.com" || hpURL.host == "netnewswire.blog") {
|
||||
return delegate?.appIconImage
|
||||
return IconImage.appIcon
|
||||
}
|
||||
|
||||
@MainActor func checkHomePageURL() {
|
||||
|
||||
@@ -8,7 +8,11 @@
|
||||
|
||||
import Foundation
|
||||
import Core
|
||||
import Images
|
||||
#if os(macOS)
|
||||
import AppKit
|
||||
#elseif os(iOS)
|
||||
import UIKit
|
||||
#endif
|
||||
|
||||
extension RSImage {
|
||||
static let appIconImage: RSImage? = {
|
||||
|
||||
Reference in New Issue
Block a user