mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-23 16:20:53 +01:00
Make article extractor report correct state on failed Mercury parses
This commit is contained in:
parent
269b9315b2
commit
f7fd003f3c
@ -79,11 +79,12 @@ class ArticleExtractor {
|
||||
decoder.dateDecodingStrategy = .iso8601
|
||||
self.article = try decoder.decode(ExtractedArticle.self, from: data)
|
||||
|
||||
self.state = .complete
|
||||
DispatchQueue.main.async {
|
||||
if self.article?.content == nil {
|
||||
self.state = .failedToParse
|
||||
self.delegate?.articleExtractionDidFail(with: URLError(.cannotDecodeContentData))
|
||||
} else {
|
||||
self.state = .complete
|
||||
self.delegate?.articleExtractionDidComplete(extractedArticle: self.article!)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user