mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-17 19:58:57 +03:00
Login screens: fix crash on back navigation
This commit is contained in:
parent
29f32cf8eb
commit
33925fcf57
3 changed files with 9 additions and 1 deletions
|
@ -47,6 +47,11 @@ interface AuthenticationService {
|
|||
*/
|
||||
fun getRegistrationWizard(): RegistrationWizard
|
||||
|
||||
/**
|
||||
* True when login and password has been sent with success to the homeserver
|
||||
*/
|
||||
val isRegistrationStarted: Boolean
|
||||
|
||||
/**
|
||||
* Cancel pending login or pending registration
|
||||
*/
|
||||
|
|
|
@ -134,6 +134,9 @@ internal class DefaultAuthenticationService @Inject constructor(@Unauthenticated
|
|||
}
|
||||
}
|
||||
|
||||
override val isRegistrationStarted: Boolean
|
||||
get() = currentRegistrationWizard?.isRegistrationStarted == true
|
||||
|
||||
override fun getLoginWizard(): LoginWizard {
|
||||
return currentLoginWizard
|
||||
?: let {
|
||||
|
|
|
@ -70,7 +70,7 @@ class LoginViewModel @AssistedInject constructor(@Assisted initialState: LoginVi
|
|||
|
||||
// True when login and password has been sent with success to the homeserver
|
||||
val isRegistrationStarted: Boolean
|
||||
get() = registrationWizard?.isRegistrationStarted == true
|
||||
get() = authenticationService.isRegistrationStarted
|
||||
|
||||
private val registrationWizard: RegistrationWizard?
|
||||
get() = authenticationService.getRegistrationWizard()
|
||||
|
|
Loading…
Add table
Reference in a new issue