Store feed.name and feed.editedName in ODB.
This commit is contained in:
parent
ce1fe6ed1f
commit
abd8fb2236
@ -65,7 +65,19 @@ public final class Feed: DisplayNameProvider, UnreadCountProvider, Hashable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public var name: String?
|
public var name: String? {
|
||||||
|
get {
|
||||||
|
return settingsTable.string(for: Key.name)
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
let oldNameForDisplay = nameForDisplay
|
||||||
|
settingsTable.setString(newValue, for: Key.name)
|
||||||
|
if oldNameForDisplay != nameForDisplay {
|
||||||
|
postDisplayNameDidChangeNotification()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public var authors: Set<Author>? {
|
public var authors: Set<Author>? {
|
||||||
get {
|
get {
|
||||||
guard let authorsJSON = settingsTable.string(for: Key.authors) else {
|
guard let authorsJSON = settingsTable.string(for: Key.authors) else {
|
||||||
@ -167,8 +179,8 @@ public final class Feed: DisplayNameProvider, UnreadCountProvider, Hashable {
|
|||||||
let feedID = dictionary[Key.feedID] as? String ?? url
|
let feedID = dictionary[Key.feedID] as? String ?? url
|
||||||
|
|
||||||
self.init(account: account, url: url, feedID: feedID)
|
self.init(account: account, url: url, feedID: feedID)
|
||||||
self.name = dictionary[Key.name] as? String
|
|
||||||
self.editedName = dictionary[Key.editedName] as? String
|
self.editedName = dictionary[Key.editedName] as? String
|
||||||
|
self.name = dictionary[Key.name] as? String
|
||||||
}
|
}
|
||||||
|
|
||||||
public static func isFeedDictionary(_ d: [String: Any]) -> Bool {
|
public static func isFeedDictionary(_ d: [String: Any]) -> Bool {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user