mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Fix some build errors.
This commit is contained in:
@@ -26,11 +26,11 @@ public struct ParsedAuthor: Hashable, Codable, Sendable {
|
||||
init(singleString: String) {
|
||||
|
||||
if singleString.contains("@") {
|
||||
init(name: nil, url: nil, avatarURL: nil, emailAddress: singleString)
|
||||
self.init(name: nil, url: nil, avatarURL: nil, emailAddress: singleString)
|
||||
} else if singleString.lowercased().hasPrefix("http") {
|
||||
init(name: nil, url: singleString, avatarURL: nil, emailAddress: nil)
|
||||
self.init(name: nil, url: singleString, avatarURL: nil, emailAddress: nil)
|
||||
} else {
|
||||
init(name: singleString, url: nil, avatarURL: nil, emailAddress: nil)
|
||||
self.init(name: singleString, url: nil, avatarURL: nil, emailAddress: nil)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,22 +10,24 @@ import os
|
||||
|
||||
public class OPMLItem {
|
||||
|
||||
public let feedSpecifier: OPMLFeedSpecifier
|
||||
public let feedSpecifier: OPMLFeedSpecifier?
|
||||
|
||||
public let attributes: [String: String]
|
||||
public let attributes: [String: String]?
|
||||
public let titleFromAttributes: String?
|
||||
|
||||
public var items: [OPMLItem]?
|
||||
public var isFolder: Bool {
|
||||
items.count > 0
|
||||
(items?.count ?? 0) > 0
|
||||
}
|
||||
|
||||
init(attributes: [String : String]?) {
|
||||
|
||||
self.titleFromAttributes = attributes.opml_title ?? attributes.opml_text
|
||||
self.titleFromAttributes = attributes?.opml_title ?? attributes?.opml_text
|
||||
self.attributes = attributes
|
||||
|
||||
self.feedSpecifier = ParsedOPMLFeedSpecifier(title: self.titleFromAttributes, feedDescription: attributes.opml_description, homePageURL: attributes.opml_htmlUrl, feedURL: attributes.opml_xmlUrl)
|
||||
if let feedURL = attributes?.opml_xmlUrl {
|
||||
self.feedSpecifier = OPMLFeedSpecifier(title: self.titleFromAttributes, feedDescription: attributes?.opml_description, homePageURL: attributes?.opml_htmlUrl, feedURL: feedURL)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
//
|
||||
// File.swift
|
||||
//
|
||||
//
|
||||
// Created by Brent Simmons on 4/7/24.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
extension RSHTMLMetadataParser: @unchecked Sendable {}
|
||||
Reference in New Issue
Block a user