Fix some concurrency warnings.

This commit is contained in:
Brent Simmons 2024-04-21 19:57:47 -07:00
parent 8ff9f24b61
commit 261c3136d2
2 changed files with 6 additions and 19 deletions

View File

@ -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
}
}

View File

@ -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 {