Make the server selection coordinator aware of which flow it is for.

Don't set the authentication state until after registration has been queried to avoid using the wrong client if the user cancelled the selection.
This commit is contained in:
Doug
2022-05-24 13:10:13 +01:00
parent afc2c9f1c5
commit 26b4130eb1
6 changed files with 26 additions and 25 deletions
@@ -30,6 +30,11 @@ struct AuthenticationState {
self.homeserver = Homeserver(address: homeserverAddress)
}
init(flow: AuthenticationFlow, homeserver: Homeserver) {
self.flow = flow
self.homeserver = homeserver
}
struct Homeserver {
/// The homeserver address as returned by the server.
var address: String