If there is a pending email validation continue on this step
This commit is contained in:
parent
61a41493ac
commit
f9c35e6bcb
|
@ -10,6 +10,7 @@ Improvements 🙌:
|
||||||
- Small optimisation of scrolling experience in timeline (#2114)
|
- Small optimisation of scrolling experience in timeline (#2114)
|
||||||
- Allow user to reset cross signing if he has no way to recover (#2052)
|
- Allow user to reset cross signing if he has no way to recover (#2052)
|
||||||
- Create home shortcut for any room (#1525)
|
- Create home shortcut for any room (#1525)
|
||||||
|
- Can't confirm email due to killing by Android (#2021)
|
||||||
|
|
||||||
Bugfix 🐛:
|
Bugfix 🐛:
|
||||||
- Improve support for image/audio/video/file selection with intent changes (#1376)
|
- Improve support for image/audio/video/file selection with intent changes (#1376)
|
||||||
|
|
|
@ -27,7 +27,7 @@ sealed class LoginAction : VectorViewModelAction {
|
||||||
data class UpdateSignMode(val signMode: SignMode) : LoginAction()
|
data class UpdateSignMode(val signMode: SignMode) : LoginAction()
|
||||||
data class LoginWithToken(val loginToken: String) : LoginAction()
|
data class LoginWithToken(val loginToken: String) : LoginAction()
|
||||||
data class WebLoginSuccess(val credentials: Credentials) : LoginAction()
|
data class WebLoginSuccess(val credentials: Credentials) : LoginAction()
|
||||||
data class InitWith(val loginConfig: LoginConfig) : LoginAction()
|
data class InitWith(val loginConfig: LoginConfig?) : LoginAction()
|
||||||
data class ResetPassword(val email: String, val newPassword: String) : LoginAction()
|
data class ResetPassword(val email: String, val newPassword: String) : LoginAction()
|
||||||
object ResetPasswordMailConfirmed : LoginAction()
|
object ResetPasswordMailConfirmed : LoginAction()
|
||||||
|
|
||||||
|
|
|
@ -91,19 +91,19 @@ open class LoginActivity : VectorBaseActivity(), ToolbarConfigurable, UnlockedAc
|
||||||
addFirstFragment()
|
addFirstFragment()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get config extra
|
|
||||||
val loginConfig = intent.getParcelableExtra<LoginConfig?>(EXTRA_CONFIG)
|
|
||||||
if (loginConfig != null && isFirstCreation()) {
|
|
||||||
// TODO Check this
|
|
||||||
loginViewModel.handle(LoginAction.InitWith(loginConfig))
|
|
||||||
}
|
|
||||||
|
|
||||||
loginViewModel
|
loginViewModel
|
||||||
.subscribe(this) {
|
.subscribe(this) {
|
||||||
updateWithState(it)
|
updateWithState(it)
|
||||||
}
|
}
|
||||||
|
|
||||||
loginViewModel.observeViewEvents { handleLoginViewEvents(it) }
|
loginViewModel.observeViewEvents { handleLoginViewEvents(it) }
|
||||||
|
|
||||||
|
// Get config extra
|
||||||
|
val loginConfig = intent.getParcelableExtra<LoginConfig?>(EXTRA_CONFIG)
|
||||||
|
if (isFirstCreation()) {
|
||||||
|
// TODO Check this
|
||||||
|
loginViewModel.handle(LoginAction.InitWith(loginConfig))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected open fun addFirstFragment() {
|
protected open fun addFirstFragment() {
|
||||||
|
|
|
@ -417,6 +417,13 @@ class LoginViewModel @AssistedInject constructor(
|
||||||
|
|
||||||
private fun handleInitWith(action: LoginAction.InitWith) {
|
private fun handleInitWith(action: LoginAction.InitWith) {
|
||||||
loginConfig = action.loginConfig
|
loginConfig = action.loginConfig
|
||||||
|
|
||||||
|
// If there is a pending email validation continue on this step
|
||||||
|
currentThreePid?.let {
|
||||||
|
if (isRegistrationStarted) {
|
||||||
|
handle(LoginAction.PostViewEvent(LoginViewEvents.OnSendEmailSuccess(it)))
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun handleResetPassword(action: LoginAction.ResetPassword) {
|
private fun handleResetPassword(action: LoginAction.ResetPassword) {
|
||||||
|
|
Loading…
Reference in New Issue