Change NetNewsWire News URL to use the XML version since some sync services don't understand JSON.

This commit is contained in:
Maurice Parker
2020-10-29 17:52:58 -05:00
parent 64c93ed118
commit 7c91a1df3a
4 changed files with 12 additions and 9 deletions

View File

@@ -17,7 +17,9 @@ import ArticlesDatabase
public final class AccountManager: UnreadCountProvider {
public static var shared: AccountManager!
public static let netNewsWireNewsURL = "https://nnw.ranchero.com/feed.xml"
private static let jsonNetNewsWireNewsURL = "https://nnw.ranchero.com/feed.json"
public let defaultAccount: Account
private let accountsFolder: String
@@ -319,6 +321,10 @@ public final class AccountManager: UnreadCountProvider {
return false
}
public func anyAccountHasNetNewsWireNewsSubscription() -> Bool {
return anyAccountHasFeedWithURL(Self.netNewsWireNewsURL) || anyAccountHasFeedWithURL(Self.jsonNetNewsWireNewsURL)
}
public func anyAccountHasFeedWithURL(_ urlString: String) -> Bool {
for account in activeAccounts {