mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-07 06:23:55 +01:00
Login screens: keep PendingSessionData member up to date
This commit is contained in:
parent
db87d8f644
commit
f063abe068
@ -157,10 +157,12 @@ internal class DefaultAuthenticationService @Inject constructor(@Unauthenticated
|
||||
// Keep only the home sever config
|
||||
pendingSessionData?.homeServerConnectionConfig
|
||||
?.let {
|
||||
pendingSessionStore.savePendingSessionData(PendingSessionData(it))
|
||||
pendingSessionData = PendingSessionData(it)
|
||||
.also { data -> pendingSessionStore.savePendingSessionData(data) }
|
||||
}
|
||||
?: run {
|
||||
// Should not happen
|
||||
pendingSessionData = null
|
||||
pendingSessionStore.delete()
|
||||
}
|
||||
}
|
||||
|
@ -92,17 +92,15 @@ internal class DefaultLoginWizard(
|
||||
pendingSessionData.sendAttempt
|
||||
)
|
||||
|
||||
pendingSessionData = pendingSessionData.copy(
|
||||
sendAttempt = pendingSessionData.sendAttempt + 1
|
||||
).also { pendingSessionStore.savePendingSessionData(it) }
|
||||
pendingSessionData = pendingSessionData.copy(sendAttempt = pendingSessionData.sendAttempt + 1)
|
||||
.also { pendingSessionStore.savePendingSessionData(it) }
|
||||
|
||||
val result = executeRequest<AddThreePidRegistrationResponse> {
|
||||
apiCall = authAPI.resetPassword(AddThreePidRegistrationParams.from(param))
|
||||
}
|
||||
|
||||
pendingSessionData = pendingSessionData.copy(
|
||||
resetPasswordData = ResetPasswordData(newPassword, result)
|
||||
).also { pendingSessionStore.savePendingSessionData(it) }
|
||||
pendingSessionData = pendingSessionData.copy(resetPasswordData = ResetPasswordData(newPassword, result))
|
||||
.also { pendingSessionStore.savePendingSessionData(it) }
|
||||
}
|
||||
|
||||
override fun resetPasswordMailConfirmed(callback: MatrixCallback<Unit>): Cancelable {
|
||||
|
Loading…
x
Reference in New Issue
Block a user