This commit is contained in:
Benoit Marty 2021-04-15 16:19:24 +02:00 committed by Benoit Marty
parent 4486181669
commit af3893cdc9
3 changed files with 4 additions and 2 deletions

View file

@ -217,6 +217,7 @@ open class LoginActivity2 : VectorBaseActivity<ActivityLoginBinding>(), ToolbarC
is LoginViewEvents2.OpenPasswordScreen -> { is LoginViewEvents2.OpenPasswordScreen -> {
addFragmentToBackstack(R.id.loginFragmentContainer, addFragmentToBackstack(R.id.loginFragmentContainer,
LoginFragment2SigninPassword::class.java, LoginFragment2SigninPassword::class.java,
tag = FRAGMENT_LOGIN_TAG,
option = commonOption) option = commonOption)
} }
is LoginViewEvents2.OpenSignupPasswordScreen -> { is LoginViewEvents2.OpenSignupPasswordScreen -> {
@ -234,6 +235,7 @@ open class LoginActivity2 : VectorBaseActivity<ActivityLoginBinding>(), ToolbarC
is LoginViewEvents2.OpenSignInWithAnythingScreen -> { is LoginViewEvents2.OpenSignInWithAnythingScreen -> {
addFragmentToBackstack(R.id.loginFragmentContainer, addFragmentToBackstack(R.id.loginFragmentContainer,
LoginFragmentToAny2::class.java, LoginFragmentToAny2::class.java,
tag = FRAGMENT_LOGIN_TAG,
option = commonOption) option = commonOption)
} }
is LoginViewEvents2.OnSendMsisdnSuccess -> is LoginViewEvents2.OnSendMsisdnSuccess ->

View file

@ -154,7 +154,7 @@ class LoginFragment2SigninPassword @Inject constructor(
} }
override fun resetViewModel() { override fun resetViewModel() {
loginViewModel.handle(LoginAction2.ResetSignin) // loginViewModel.handle(LoginAction2.ResetSignin)
} }
override fun onError(throwable: Throwable) { override fun onError(throwable: Throwable) {

View file

@ -105,12 +105,12 @@ class LoginResetPasswordFragment2 @Inject constructor() : AbstractLoginFragment2
} }
if (showWarning) { if (showWarning) {
showWarning = false
// Display a warning as Riot-Web does first // Display a warning as Riot-Web does first
AlertDialog.Builder(requireActivity()) AlertDialog.Builder(requireActivity())
.setTitle(R.string.login_reset_password_warning_title) .setTitle(R.string.login_reset_password_warning_title)
.setMessage(R.string.login_reset_password_warning_content) .setMessage(R.string.login_reset_password_warning_content)
.setPositiveButton(R.string.login_reset_password_warning_submit) { _, _ -> .setPositiveButton(R.string.login_reset_password_warning_submit) { _, _ ->
showWarning = false
doSubmit() doSubmit()
} }
.setNegativeButton(R.string.cancel, null) .setNegativeButton(R.string.cancel, null)