diff --git a/Frameworks/Articles/Article.swift b/Frameworks/Articles/Article.swift index 1a6b17c0b..32368f21c 100644 --- a/Frameworks/Articles/Article.swift +++ b/Frameworks/Articles/Article.swift @@ -27,7 +27,10 @@ public struct Article: Hashable { public let authors: Set? public let attachments: Set? public let status: ArticleStatus - + public var hashValue: Int { + return articleID.hashValue + } + public init(accountID: String, articleID: String?, feedID: String, uniqueID: String, title: String?, contentHTML: String?, contentText: String?, url: String?, externalURL: String?, summary: String?, imageURL: String?, bannerImageURL: String?, datePublished: Date?, dateModified: Date?, authors: Set?, attachments: Set?, status: ArticleStatus) { self.accountID = accountID diff --git a/Frameworks/ArticlesDatabase/DatabaseArticle.swift b/Frameworks/ArticlesDatabase/DatabaseArticle.swift index 1d283eacc..7a8d22acf 100644 --- a/Frameworks/ArticlesDatabase/DatabaseArticle.swift +++ b/Frameworks/ArticlesDatabase/DatabaseArticle.swift @@ -28,6 +28,9 @@ struct DatabaseArticle: Hashable { let datePublished: Date? let dateModified: Date? let status: ArticleStatus + var hashValue: Int { + return articleID.hashValue + } }