Pay attention to the changed key when handling feed setting change notifications.
This commit is contained in:
parent
5f1bdb29ec
commit
70bc4a7b45
@ -19,14 +19,14 @@ public extension Feed {
|
|||||||
public static let FeedSettingUserInfoKey = "feedSetting"
|
public static let FeedSettingUserInfoKey = "feedSetting"
|
||||||
|
|
||||||
public struct FeedSettingKey {
|
public struct FeedSettingKey {
|
||||||
static let homePageURL = "homePageURL"
|
public static let homePageURL = "homePageURL"
|
||||||
static let iconURL = "iconURL"
|
public static let iconURL = "iconURL"
|
||||||
static let faviconURL = "faviconURL"
|
public static let faviconURL = "faviconURL"
|
||||||
static let name = "name"
|
public static let name = "name"
|
||||||
static let editedName = "editedName"
|
public static let editedName = "editedName"
|
||||||
static let authors = "authors"
|
public static let authors = "authors"
|
||||||
static let contentHash = "contentHash"
|
public static let contentHash = "contentHash"
|
||||||
static let conditionalGetInfo = "conditionalGetInfo"
|
public static let conditionalGetInfo = "conditionalGetInfo"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,10 +224,12 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
|||||||
|
|
||||||
@objc func feedSettingDidChange(_ note: Notification) {
|
@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
|
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) {
|
@objc func inspectableObjectsDidChange(_ note: Notification) {
|
||||||
|
@ -129,10 +129,12 @@ protocol SidebarDelegate: class {
|
|||||||
|
|
||||||
@objc func feedSettingDidChange(_ note: Notification) {
|
@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
|
return
|
||||||
}
|
}
|
||||||
configureCellsForRepresentedObject(feed)
|
if key == Feed.FeedSettingKey.homePageURL || key == Feed.FeedSettingKey.faviconURL {
|
||||||
|
configureCellsForRepresentedObject(feed)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc func displayNameDidChange(_ note: Notification) {
|
@objc func displayNameDidChange(_ note: Notification) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user