From 904feb9950acda0ba8bd349413e24481990173cf Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Fri, 14 Sep 2018 22:23:30 -0700 Subject: [PATCH] Store feed.homePageURL in ODB. --- Frameworks/Account/Feed.swift | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Frameworks/Account/Feed.swift b/Frameworks/Account/Feed.swift index 3fded65a5..a84a4e971 100644 --- a/Frameworks/Account/Feed.swift +++ b/Frameworks/Account/Feed.swift @@ -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 }