mirror of
https://github.com/bitwarden/android.git
synced 2026-06-08 08:06:32 -05:00
Disable LandingScreen Continue button until data is entered (#89)
This commit is contained in:
committed by
Álison Fernandes
parent
9fe145d75d
commit
bac5e4e030
@@ -23,7 +23,7 @@ class LandingViewModel @Inject constructor(
|
||||
initialState = savedStateHandle[KEY_STATE]
|
||||
?: LandingState(
|
||||
emailInput = "",
|
||||
isContinueButtonEnabled = true,
|
||||
isContinueButtonEnabled = false,
|
||||
isRememberMeEnabled = false,
|
||||
),
|
||||
) {
|
||||
@@ -45,7 +45,13 @@ class LandingViewModel @Inject constructor(
|
||||
}
|
||||
|
||||
private fun handleEmailInputUpdated(action: LandingAction.EmailInputChanged) {
|
||||
mutableStateFlow.update { it.copy(emailInput = action.input) }
|
||||
val email = action.input
|
||||
mutableStateFlow.update {
|
||||
it.copy(
|
||||
emailInput = email,
|
||||
isContinueButtonEnabled = email.isNotBlank(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleContinueButtonClicked() {
|
||||
|
||||
Reference in New Issue
Block a user