This commit is contained in:
Benoit Marty 2019-11-15 14:53:02 +01:00
parent fb46a14172
commit 9a628c7b5d
10 changed files with 6 additions and 18 deletions

View file

@ -21,5 +21,4 @@ import im.vector.matrix.android.api.auth.data.HomeServerConnectionConfig
interface RegistrationService {
fun getOrCreateRegistrationWizard(homeServerConnectionConfig: HomeServerConnectionConfig): RegistrationWizard
}

View file

@ -27,5 +27,4 @@ interface RegistrationWizard {
fun performReCaptcha(response: String, callback: MatrixCallback<Session>): Cancelable
// TODO Add other method here
}

View file

@ -18,7 +18,6 @@ package im.vector.matrix.android.api.auth.registration
import im.vector.matrix.android.api.util.JsonDict
sealed class Stage(open val mandatory: Boolean) {
// m.login.password
@ -45,7 +44,4 @@ sealed class Stage(open val mandatory: Boolean) {
data class Other(override val mandatory: Boolean, val type: String, val params: JsonDict?) : Stage(mandatory)
}
class TermPolicies {
}
class TermPolicies

View file

@ -30,5 +30,4 @@ interface Cancelable {
}
}
object NoOpCancellable : Cancelable

View file

@ -144,10 +144,10 @@ internal class DefaultAuthenticator @Inject constructor(@Unauthenticated
private fun resetPasswordInternal(/*homeServerConnectionConfig: HomeServerConnectionConfig, email: String, newPassword: String*/) {
// TODO
error("Not implemented")
//val authAPI = buildAuthAPI(homeServerConnectionConfig)
//executeRequest<LoginFlowResponse> {
// val authAPI = buildAuthAPI(homeServerConnectionConfig)
// executeRequest<LoginFlowResponse> {
// apiCall = authAPI.getLoginFlows()
//}
// }
}
private fun buildAuthAPI(homeServerConnectionConfig: HomeServerConnectionConfig): AuthAPI {

View file

@ -72,7 +72,6 @@ internal class DefaultRegistrationWizard(private val homeServerConnectionConfig:
), callback)
}
private fun performRegistrationRequest(registrationParams: RegistrationParams, callback: MatrixCallback<Session>): Cancelable {
val job = GlobalScope.launch(coroutineDispatchers.main) {
val result = runCatching {

View file

@ -28,4 +28,4 @@ data class LocalizedFlowDataLoginTerms(
var version: String? = null,
var localizedUrl: String? = null,
var localizedName: String? = null
) : Parcelable
) : Parcelable

View file

@ -44,4 +44,4 @@ data class RegistrationParams(
// Temporary flag to notify the server that we support msisdn flow. Used to prevent old app
// versions to end up in fallback because the HS returns the msisdn flow which they don't support
val x_show_msisdn: Boolean? = null
)
)

View file

@ -115,7 +115,6 @@ class LoginServerUrlFormFragment @Inject constructor(
if (serverUrl.startsWith("http").not()) {
serverUrl = "https://$serverUrl"
loginServerUrlFormHomeServerUrl.setText(serverUrl)
}
loginViewModel.handle(LoginAction.UpdateHomeServer(serverUrl))
}

View file

@ -16,7 +16,6 @@
package im.vector.riotx.features.login
import com.airbnb.mvrx.*
data class LoginViewState(
@ -25,7 +24,6 @@ data class LoginViewState(
val asyncResetPassword: Async<Unit> = Uninitialized
) : MvRxState {
fun isLoading(): Boolean {
// TODO Add other async here
return asyncLoginAction is Loading
@ -38,4 +36,3 @@ data class LoginViewState(
return asyncLoginAction is Success
}
}