diff --git a/Frameworks/Account/DataExtensions.swift b/Frameworks/Account/DataExtensions.swift index f9a7f9a96..779e14c64 100644 --- a/Frameworks/Account/DataExtensions.swift +++ b/Frameworks/Account/DataExtensions.swift @@ -19,14 +19,14 @@ public extension Feed { public static let FeedSettingUserInfoKey = "feedSetting" public struct FeedSettingKey { - static let homePageURL = "homePageURL" - static let iconURL = "iconURL" - static let faviconURL = "faviconURL" - static let name = "name" - static let editedName = "editedName" - static let authors = "authors" - static let contentHash = "contentHash" - static let conditionalGetInfo = "conditionalGetInfo" + public static let homePageURL = "homePageURL" + public static let iconURL = "iconURL" + public static let faviconURL = "faviconURL" + public static let name = "name" + public static let editedName = "editedName" + public static let authors = "authors" + public static let contentHash = "contentHash" + public static let conditionalGetInfo = "conditionalGetInfo" } } diff --git a/NetNewsWire/AppDelegate.swift b/NetNewsWire/AppDelegate.swift index 8b5afc61c..9479c9ed7 100644 --- a/NetNewsWire/AppDelegate.swift +++ b/NetNewsWire/AppDelegate.swift @@ -224,10 +224,12 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations, @objc func feedSettingDidChange(_ note: Notification) { - guard let feed = note.object as? Feed else { + guard let feed = note.object as? Feed, let key = note.userInfo?[Feed.FeedSettingUserInfoKey] as? String else { return } - let _ = faviconDownloader.favicon(for: feed) + if key == Feed.FeedSettingKey.homePageURL || key == Feed.FeedSettingKey.faviconURL { + let _ = faviconDownloader.favicon(for: feed) + } } @objc func inspectableObjectsDidChange(_ note: Notification) { diff --git a/NetNewsWire/MainWindow/Sidebar/SidebarViewController.swift b/NetNewsWire/MainWindow/Sidebar/SidebarViewController.swift index d77c69df0..d71745b4f 100644 --- a/NetNewsWire/MainWindow/Sidebar/SidebarViewController.swift +++ b/NetNewsWire/MainWindow/Sidebar/SidebarViewController.swift @@ -129,10 +129,12 @@ protocol SidebarDelegate: class { @objc func feedSettingDidChange(_ note: Notification) { - guard let feed = note.object as? Feed else { + guard let feed = note.object as? Feed, let key = note.userInfo?[Feed.FeedSettingUserInfoKey] as? String else { return } - configureCellsForRepresentedObject(feed) + if key == Feed.FeedSettingKey.homePageURL || key == Feed.FeedSettingKey.faviconURL { + configureCellsForRepresentedObject(feed) + } } @objc func displayNameDidChange(_ note: Notification) {