mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Make sure delegates get set even if a metadata file isn't found. Issue #1051
This commit is contained in:
@@ -48,8 +48,8 @@ private extension AccountMetadataFile {
|
||||
if let fileData = try? Data(contentsOf: readURL) {
|
||||
let decoder = PropertyListDecoder()
|
||||
account.metadata = (try? decoder.decode(AccountMetadata.self, from: fileData)) ?? AccountMetadata()
|
||||
account.metadata.delegate = account
|
||||
}
|
||||
account.metadata.delegate = account
|
||||
})
|
||||
|
||||
if let error = errorPointer?.pointee {
|
||||
|
||||
@@ -48,10 +48,10 @@ private extension FeedMetadataFile {
|
||||
if let fileData = try? Data(contentsOf: readURL) {
|
||||
let decoder = PropertyListDecoder()
|
||||
account.feedMetadata = (try? decoder.decode(Account.FeedMetadataDictionary.self, from: fileData)) ?? Account.FeedMetadataDictionary()
|
||||
account.feedMetadata.values.forEach { $0.delegate = account }
|
||||
if !account.startingUp {
|
||||
account.resetFeedMetadataAndUnreadCounts()
|
||||
}
|
||||
}
|
||||
account.feedMetadata.values.forEach { $0.delegate = account }
|
||||
if !account.startingUp {
|
||||
account.resetFeedMetadataAndUnreadCounts()
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user