From 4bdbe23e6910ff7e704c68dece6d38af925fdda3 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sun, 27 Oct 2024 11:55:40 -0700 Subject: [PATCH] Add createAccountURL computed property to AccountType. --- Modules/Account/Sources/Account/Account.swift | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Modules/Account/Sources/Account/Account.swift b/Modules/Account/Sources/Account/Account.swift index f6343c755..f1ee21449 100644 --- a/Modules/Account/Sources/Account/Account.swift +++ b/Modules/Account/Sources/Account/Account.swift @@ -50,7 +50,27 @@ public enum AccountType: Int, Codable, Sendable { public var isDeveloperRestricted: Bool { return self == .cloudKit || self == .feedbin || self == .feedly || self == .inoreader } - + + public var createAccountURL: URL? { + switch self { + case .onMyMac, .cloudKit: + return nil + case .feedly: + return URL(string: "https://feedly.com/")! + case .feedbin: + return URL(string: "https://feedbin.com/signup")! + case .newsBlur: + return URL(string: "https://newsblur.com/")! + case .freshRSS: + return URL(string: "https://freshrss.org/")! + case .inoreader: + return URL(string: "https://www.inoreader.com/")! + case .bazQux: + return URL(string: "https://bazqux.com/")! + case .theOldReader: + return URL(string: "https://theoldreader.com/")! + } + } } public enum FetchType {