Account restrictions removed.
This commit is contained in:
parent
99b2d3bb01
commit
c630bf3b9f
|
@ -38,11 +38,7 @@ class AddAccountModel: ObservableObject {
|
||||||
}
|
}
|
||||||
@Published var showError: Bool = false
|
@Published var showError: Bool = false
|
||||||
@Published var accountAdded: Bool = false
|
@Published var accountAdded: Bool = false
|
||||||
|
|
||||||
init() {
|
|
||||||
restrictAccounts()
|
|
||||||
}
|
|
||||||
|
|
||||||
func resetUserEntries() {
|
func resetUserEntries() {
|
||||||
userName = ""
|
userName = ""
|
||||||
password = ""
|
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
|
// MARK:- Authentication APIs
|
||||||
|
|
Loading…
Reference in New Issue