mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Use accountType.createAccountURL property.
This commit is contained in:
@@ -194,18 +194,12 @@ class AccountsReaderAPIWindowController: NSWindowController {
|
||||
}
|
||||
|
||||
@IBAction func createAccountWithProvider(_ sender: Any) {
|
||||
switch accountType {
|
||||
case .freshRSS:
|
||||
NSWorkspace.shared.open(URL(string: "https://freshrss.org")!)
|
||||
case .inoreader:
|
||||
NSWorkspace.shared.open(URL(string: "https://www.inoreader.com")!)
|
||||
case .bazQux:
|
||||
NSWorkspace.shared.open(URL(string: "https://bazqux.com")!)
|
||||
case .theOldReader:
|
||||
NSWorkspace.shared.open(URL(string: "https://theoldreader.com")!)
|
||||
default:
|
||||
|
||||
guard let createAccountURL = accountType.createAccountURL else {
|
||||
return
|
||||
}
|
||||
|
||||
NSWorkspace.shared.open(createAccountURL)
|
||||
}
|
||||
|
||||
// MARK: Autofill
|
||||
|
||||
@@ -265,20 +265,12 @@ class ReaderAPIAccountViewController: UITableViewController {
|
||||
}
|
||||
|
||||
@IBAction func signUpWithProvider(_ sender: Any) {
|
||||
var url: URL!
|
||||
switch accountType {
|
||||
case .bazQux:
|
||||
url = URL(string: "https://bazqux.com")!
|
||||
case .inoreader:
|
||||
url = URL(string: "https://www.inoreader.com")!
|
||||
case .theOldReader:
|
||||
url = URL(string: "https://theoldreader.com")!
|
||||
case .freshRSS:
|
||||
url = URL(string: "https://freshrss.org")!
|
||||
default:
|
||||
return
|
||||
|
||||
guard let createAccountURL = accountType.createAccountURL else {
|
||||
return
|
||||
}
|
||||
let safari = SFSafariViewController(url: url)
|
||||
|
||||
let safari = SFSafariViewController(url: createAccountURL)
|
||||
safari.modalPresentationStyle = .currentContext
|
||||
self.present(safari, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user