mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-27 10:02:37 +01:00
Save and restore iconURL in Feed.
This commit is contained in:
parent
26cc99db54
commit
0284117bc3
@ -16,6 +16,7 @@ public final class Feed: DisplayNameProvider, UnreadCountProvider, Hashable {
|
||||
public let url: String
|
||||
public let feedID: String
|
||||
public var homePageURL: String?
|
||||
public var iconURL: String?
|
||||
public var faviconURL: String?
|
||||
public var name: String?
|
||||
public var editedName: String?
|
||||
@ -57,6 +58,7 @@ public final class Feed: DisplayNameProvider, UnreadCountProvider, Hashable {
|
||||
static let url = "url"
|
||||
static let feedID = "feedID"
|
||||
static let homePageURL = "homePageURL"
|
||||
static let iconURL = "iconURL"
|
||||
static let faviconURL = "faviconURL"
|
||||
static let name = "name"
|
||||
static let editedName = "editedName"
|
||||
@ -74,6 +76,7 @@ public final class Feed: DisplayNameProvider, UnreadCountProvider, Hashable {
|
||||
|
||||
self.init(accountID: accountID, url: url, feedID: feedID)
|
||||
self.homePageURL = dictionary[Key.homePageURL] as? String
|
||||
self.iconURL = dictionary[Key.iconURL] as? String
|
||||
self.faviconURL = dictionary[Key.faviconURL] as? String
|
||||
self.name = dictionary[Key.name] as? String
|
||||
self.editedName = dictionary[Key.editedName] as? String
|
||||
@ -107,6 +110,9 @@ public final class Feed: DisplayNameProvider, UnreadCountProvider, Hashable {
|
||||
if let homePageURL = homePageURL {
|
||||
d[Key.homePageURL] = homePageURL
|
||||
}
|
||||
if let iconURL = iconURL {
|
||||
d[Key.iconURL] = iconURL
|
||||
}
|
||||
if let faviconURL = faviconURL {
|
||||
d[Key.faviconURL] = faviconURL
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user