Hide password field in outgoing server settings when not needed
This commit is contained in:
parent
37ea82bd8f
commit
ba07e162e4
2 changed files with 14 additions and 8 deletions
|
@ -145,14 +145,16 @@ internal fun AccountOutgoingConfigContent(
|
|||
)
|
||||
}
|
||||
|
||||
item {
|
||||
PasswordInput(
|
||||
password = state.password.value,
|
||||
errorMessage = state.password.error?.toResourceString(resources),
|
||||
onPasswordChange = { onEvent(Event.PasswordChanged(it)) },
|
||||
isRequired = true,
|
||||
contentPadding = defaultItemPadding(),
|
||||
)
|
||||
if (state.isPasswordFieldVisible) {
|
||||
item {
|
||||
PasswordInput(
|
||||
password = state.password.value,
|
||||
errorMessage = state.password.error?.toResourceString(resources),
|
||||
onPasswordChange = { onEvent(Event.PasswordChanged(it)) },
|
||||
isRequired = true,
|
||||
contentPadding = defaultItemPadding(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
item {
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
package app.k9mail.feature.account.setup.ui.outgoing
|
||||
|
||||
internal val AccountOutgoingConfigContract.State.isPasswordFieldVisible: Boolean
|
||||
get() = authenticationType.isPasswordRequired
|
Loading…
Reference in a new issue