mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-25 01:01:21 +01:00
Store feed.homePageURL in ODB.
This commit is contained in:
parent
fb9590de98
commit
904feb9950
@ -33,17 +33,16 @@ public final class Feed: DisplayNameProvider, UnreadCountProvider, Hashable {
|
||||
public let url: String
|
||||
public let feedID: String
|
||||
|
||||
private var _homePageURL: String?
|
||||
public var homePageURL: String? {
|
||||
get {
|
||||
return _homePageURL
|
||||
return settingsTable.string(for: Key.homePageURL)
|
||||
}
|
||||
set {
|
||||
if let url = newValue {
|
||||
_homePageURL = url.rs_normalizedURL()
|
||||
settingsTable.setString(url.rs_normalizedURL(), for: Key.homePageURL)
|
||||
}
|
||||
else {
|
||||
_homePageURL = nil
|
||||
settingsTable.setString(nil, for: Key.homePageURL)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -147,7 +146,6 @@ public final class Feed: DisplayNameProvider, UnreadCountProvider, Hashable {
|
||||
let feedID = dictionary[Key.feedID] as? String ?? url
|
||||
|
||||
self.init(account: account, url: url, feedID: feedID)
|
||||
self.homePageURL = dictionary[Key.homePageURL] as? String
|
||||
self.name = dictionary[Key.name] as? String
|
||||
self.editedName = dictionary[Key.editedName] as? String
|
||||
|
||||
@ -171,9 +169,6 @@ public final class Feed: DisplayNameProvider, UnreadCountProvider, Hashable {
|
||||
d[Key.feedID] = feedID
|
||||
}
|
||||
|
||||
if let homePageURL = homePageURL {
|
||||
d[Key.homePageURL] = homePageURL
|
||||
}
|
||||
if let name = name {
|
||||
d[Key.name] = name
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user