Account restrictions removed.

This commit is contained in:
Stuart Breckenridge 2020-07-15 10:26:03 +08:00
parent 99b2d3bb01
commit c630bf3b9f
No known key found for this signature in database
GPG Key ID: 79BD673276AE83CE
1 changed files with 1 additions and 24 deletions

View File

@ -38,11 +38,7 @@ class AddAccountModel: ObservableObject {
}
@Published var showError: Bool = false
@Published var accountAdded: Bool = false
init() {
restrictAccounts()
}
func resetUserEntries() {
userName = ""
password = ""
@ -69,25 +65,6 @@ class AddAccountModel: ObservableObject {
}
}
func restrictAccounts() {
func removeAccountType(_ accountType: AccountType) {
if let index = addableAccountTypes.firstIndex(of: accountType) {
addableAccountTypes.remove(at: index)
}
}
if AppDefaults.shared.isDeveloperBuild {
removeAccountType(.cloudKit)
removeAccountType(.feedly)
removeAccountType(.feedWrangler)
return
}
if AccountManager.shared.activeAccounts.firstIndex(where: { $0.type == .cloudKit }) != nil {
removeAccountType(.cloudKit)
}
}
}
// MARK:- Authentication APIs