mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Add an AccountProvider type and use it within the authentication flow. (#6103)
* Add an AccountProvider type and use it within AppSettings. * Use the AccountProvider type within the Authentication flow too. * Fix unit test compilation with Swift 6.4 * Make sure defaultAccountProvider takes allowOtherAccountProviders into account. * Document a caveat on using AuthenticationService.homeserver.value.accountProvider.
This commit is contained in:
+6
-6
@@ -88,18 +88,18 @@ struct ServerSelectionScreenViewState: BindableState {
|
||||
var hasValidationError: Bool {
|
||||
switch mode {
|
||||
case .userInput:
|
||||
bindings.homeserverAddress.isEmpty || isShowingFooterError
|
||||
bindings.serverNameOrBaseURL.isEmpty || isShowingFooterError
|
||||
case .picker(let options):
|
||||
!options.contains(bindings.homeserverAddress) || isShowingFooterError
|
||||
!options.contains(bindings.serverNameOrBaseURL) || isShowingFooterError
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct ServerSelectionScreenBindings {
|
||||
/// The homeserver address input or chosen by the user.
|
||||
var homeserverAddress: String
|
||||
/// The selection range in `homeserverAddress`
|
||||
var homeserverSelection: TextSelection?
|
||||
/// The homeserver input or chosen by the user.
|
||||
var serverNameOrBaseURL: String
|
||||
/// The selection range in `serverNameOrBaseURL`
|
||||
var serverNameOrBaseURLSelection: TextSelection?
|
||||
|
||||
/// Information describing the currently displayed alert.
|
||||
var alertInfo: AlertInfo<ServerSelectionScreenErrorType>?
|
||||
|
||||
Reference in New Issue
Block a user