mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +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:
@@ -150,7 +150,12 @@ class MockScreen: Identifiable {
|
||||
let appSettings: AppSettings! = appSettings
|
||||
|
||||
if id == .singleProviderAuthenticationFlow || id == .multipleProvidersAuthenticationFlow {
|
||||
let accountProviders = id == .singleProviderAuthenticationFlow ? ["example.com"] : ["guest.example.com", "example.com"]
|
||||
let accountProviders: [AccountProvider] = if id == .singleProviderAuthenticationFlow {
|
||||
[.managed(serverName: "example.com", baseURL: "https://matrix.example.com")]
|
||||
} else {
|
||||
[.managed(serverName: "guest.example.com", baseURL: "https://matrix.guest.example.com"),
|
||||
.managed(serverName: "example.com", baseURL: "https://matrix.example.com")]
|
||||
}
|
||||
appSettings.override(accountProviders: accountProviders,
|
||||
allowOtherAccountProviders: false,
|
||||
hideBrandChrome: false,
|
||||
|
||||
Reference in New Issue
Block a user