Small improvement
This commit is contained in:
parent
756b0febe6
commit
e962d1dadf
|
@ -199,7 +199,7 @@ internal class DefaultRegistrationWizard(
|
|||
code = code
|
||||
)
|
||||
val validationResponse = validateCodeTask.execute(ValidateCodeTask.Params(url, validationBody))
|
||||
if (validationResponse.success == true) {
|
||||
if (validationResponse.isSuccess()) {
|
||||
// The entered code is correct
|
||||
// Same than validate email
|
||||
return performRegistrationRequest(registrationParams, 3_000)
|
||||
|
|
|
@ -18,9 +18,12 @@ package im.vector.matrix.android.internal.auth.registration
|
|||
|
||||
import com.squareup.moshi.Json
|
||||
import com.squareup.moshi.JsonClass
|
||||
import im.vector.matrix.android.api.extensions.orFalse
|
||||
|
||||
@JsonClass(generateAdapter = true)
|
||||
data class SuccessResult(
|
||||
@Json(name = "success")
|
||||
val success: Boolean?
|
||||
)
|
||||
) {
|
||||
fun isSuccess() = success.orFalse()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue