typo and doc

This commit is contained in:
Benoit Marty 2021-02-17 17:30:13 +01:00
parent fcee1f1150
commit 51fd45d317
3 changed files with 7 additions and 2 deletions

View file

@ -30,7 +30,7 @@ import org.matrix.android.sdk.api.session.Session
interface AuthenticationService {
/**
* Request the supported login flows for this homeserver.
* This is the first method to call to be able to get a wizard to login or the create an account
* This is the first method to call to be able to get a wizard to login or to create an account
*/
suspend fun getLoginFlow(homeServerConnectionConfig: HomeServerConnectionConfig): LoginFlowResult

View file

@ -130,6 +130,11 @@ internal class DefaultAuthenticationService @Inject constructor(
?.trim { it == '/' }
}
/**
* This is the entry point of the authentication service.
* homeServerConnectionConfig contains a homeserver URL probably entered by the user, which can be a
* valid homeserver API url, the url of Element Web, or anything else.
*/
override suspend fun getLoginFlow(homeServerConnectionConfig: HomeServerConnectionConfig): LoginFlowResult {
pendingSessionData = null

View file

@ -146,7 +146,7 @@ class LoginViewModel @AssistedInject constructor(
}
private fun handleUserAcceptCertificate(action: LoginAction.UserAcceptCertificate) {
// It happen when we get the login flow, or during direct authentication.
// It happens when we get the login flow, or during direct authentication.
// So alter the homeserver config and retrieve again the login flow
when (val finalLastAction = lastAction) {
is LoginAction.UpdateHomeServer -> {