Don't allow duplicate accounts to be added for Feedbin, FeedWrangler, or NewsBlur. Issue #2448
This commit is contained in:
parent
fff256f361
commit
d0cc9654f2
|
@ -58,6 +58,11 @@ class AccountsFeedbinWindowController: NSWindowController {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
guard !AccountManager.shared.duplicateServiceAccount(type: .feedbin, username: usernameTextField.stringValue) else {
|
||||||
|
self.errorMessageLabel.stringValue = NSLocalizedString("There is already a Feedbin account with that username created.", comment: "Duplicate Error")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
actionButton.isEnabled = false
|
actionButton.isEnabled = false
|
||||||
progressIndicator.isHidden = false
|
progressIndicator.isHidden = false
|
||||||
progressIndicator.startAnimation(self)
|
progressIndicator.startAnimation(self)
|
||||||
|
|
|
@ -55,7 +55,12 @@ class AccountsNewsBlurWindowController: NSWindowController {
|
||||||
self.errorMessageLabel.stringValue = NSLocalizedString("Username required.", comment: "Credentials Error")
|
self.errorMessageLabel.stringValue = NSLocalizedString("Username required.", comment: "Credentials Error")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
guard !AccountManager.shared.duplicateServiceAccount(type: .newsBlur, username: usernameTextField.stringValue) else {
|
||||||
|
self.errorMessageLabel.stringValue = NSLocalizedString("There is already a NewsBlur account with that username created.", comment: "Duplicate Error")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
actionButton.isEnabled = false
|
actionButton.isEnabled = false
|
||||||
progressIndicator.isHidden = false
|
progressIndicator.isHidden = false
|
||||||
progressIndicator.startAnimation(self)
|
progressIndicator.startAnimation(self)
|
||||||
|
|
Loading…
Reference in New Issue