From 86744226b1f423742fc9663300bd0e322807a1ee Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sat, 22 Feb 2025 00:37:31 -0800 Subject: feat: Development commit --- Sora/Data/Booru/BooruPostXMLParser.swift | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'Sora/Data/Booru/BooruPostXMLParser.swift') diff --git a/Sora/Data/Booru/BooruPostXMLParser.swift b/Sora/Data/Booru/BooruPostXMLParser.swift index 5149e05..3bce127 100644 --- a/Sora/Data/Booru/BooruPostXMLParser.swift +++ b/Sora/Data/Booru/BooruPostXMLParser.swift @@ -58,9 +58,6 @@ class BooruPostXMLParser: NSObject, XMLParserDelegate { return } - let hasNotesStr = attributeDict["has_notes"] ?? "false" - let hasCommentsStr = attributeDict["has_comments"] ?? "false" - currentPost = BooruPost( id: id, height: height, @@ -81,8 +78,8 @@ class BooruPostXMLParser: NSObject, XMLParserDelegate { createdAt: parseCreatedAt(createdAt)!, status: status, source: source, - hasNotes: hasNotesStr == "true", - hasComments: hasCommentsStr == "true", + hasNotes: (attributeDict["has_notes"] ?? "false") == "true", + hasComments: (attributeDict["has_comments"] ?? "false") == "true", previewWidth: previewWidth, previewHeight: previewHeight ) -- cgit v1.2.3