Don't allow duplicate Reader API accounts to be created.
This commit is contained in:
parent
d0a9d64062
commit
679cd40e84
|
@ -91,6 +91,11 @@ class AccountsReaderAPIWindowController: NSWindowController {
|
|||
return
|
||||
}
|
||||
|
||||
guard !AccountManager.shared.duplicateServiceAccount(type: accountType, username: usernameTextField.stringValue) else {
|
||||
self.errorMessageLabel.stringValue = NSLocalizedString("There is already an account of this type with that username created.", comment: "Duplicate Error")
|
||||
return
|
||||
}
|
||||
|
||||
let apiURL: URL
|
||||
switch accountType {
|
||||
case .freshRSS:
|
||||
|
|
Loading…
Reference in New Issue