mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Fix two typos in JSONFeedParser which kept the parser from getting the feed’s favicon and icon URLs. Also added a test for this.
This commit is contained in:
@@ -34,8 +34,8 @@ public struct JSONFeedParser {
|
||||
let feedURL = parsedObject["feed_url"] as? String ?? parserData.url
|
||||
let feedDescription = parsedObject["description"] as? String
|
||||
let nextURL = parsedObject["next_url"] as? String
|
||||
let iconURL = parsedObject["icon_url"] as? String
|
||||
let faviconURL = parsedObject["favicon_url"] as? String
|
||||
let iconURL = parsedObject["icon"] as? String
|
||||
let faviconURL = parsedObject["favicon"] as? String
|
||||
let expired = parsedObject["expired"] as? Bool ?? false
|
||||
let hubs = parseHubs(parsedObject)
|
||||
|
||||
@@ -149,9 +149,7 @@ private extension JSONFeedParser {
|
||||
guard let attachmentsArray = itemDictionary["attachments"] as? JSONArray else {
|
||||
return nil
|
||||
}
|
||||
return Set(attachmentsArray.flatMap { (oneAttachmentObject) -> ParsedAttachment? in
|
||||
return parseAttachment(oneAttachmentObject)
|
||||
})
|
||||
return Set(attachmentsArray.flatMap { parseAttachment($0) })
|
||||
}
|
||||
|
||||
static func parseAttachment(_ attachmentObject: JSONDictionary) -> ParsedAttachment? {
|
||||
|
||||
Reference in New Issue
Block a user