Normalize homePageURL on init-ing Feed.

This commit is contained in:
Brent Simmons
2018-09-02 12:08:35 -07:00
parent b4e711746d
commit 5d2a3e9142
2 changed files with 4 additions and 2 deletions

View File

@@ -86,7 +86,9 @@ public final class Feed: DisplayNameProvider, UnreadCountProvider, Hashable {
let feedID = dictionary[Key.feedID] as? String ?? url
self.init(accountID: accountID, url: url, feedID: feedID)
self.homePageURL = dictionary[Key.homePageURL] as? String
if let homePageURL = dictionary[Key.homePageURL] as? String {
self.homePageURL = homePageURL.rs_normalizedURL()
}
self.iconURL = dictionary[Key.iconURL] as? String
self.faviconURL = dictionary[Key.faviconURL] as? String
self.name = dictionary[Key.name] as? String