diff --git a/Account/Sources/Account/Feed.swift b/Account/Sources/Account/Feed.swift index 8d123cc0c..5f9db154b 100644 --- a/Account/Sources/Account/Feed.swift +++ b/Account/Sources/Account/Feed.swift @@ -15,15 +15,7 @@ import Core public weak var account: Account? public let url: String - - public var feedID: String { - get { - return metadata.feedID - } - set { - metadata.feedID = newValue - } - } + public let feedID: String public var homePageURL: String? { get { @@ -242,6 +234,7 @@ import Core self.account = account self.accountID = account.accountID self.url = url + self.feedID = metadata.feedID self.metadata = metadata } @@ -255,13 +248,13 @@ import Core // MARK: - Hashable - public func hash(into hasher: inout Hasher) { + nonisolated public func hash(into hasher: inout Hasher) { hasher.combine(feedID) } // MARK: - Equatable - public class func ==(lhs: Feed, rhs: Feed) -> Bool { + nonisolated public class func ==(lhs: Feed, rhs: Feed) -> Bool { return lhs.feedID == rhs.feedID && lhs.accountID == rhs.accountID } } diff --git a/Account/Sources/Account/FeedMetadata.swift b/Account/Sources/Account/FeedMetadata.swift index 6f2e2a89b..cb5efca3d 100644 --- a/Account/Sources/Account/FeedMetadata.swift +++ b/Account/Sources/Account/FeedMetadata.swift @@ -32,14 +32,8 @@ final class FeedMetadata: Codable { case folderRelationship } - var feedID: String { - didSet { - if feedID != oldValue { - valueDidChange(.feedID) - } - } - } - + let feedID: String + var homePageURL: String? { didSet { if homePageURL != oldValue {