Supress warning ModifierComposed for autofill, there is a low risk of performance issue here.

This commit is contained in:
Benoit Marty 2024-04-03 12:00:21 +02:00 committed by Benoit Marty
parent 000bcb448c
commit 07ca064ac4
2 changed files with 18 additions and 11 deletions

View file

@ -141,7 +141,7 @@ fun LoginPasswordView(
// Submit
Box(
modifier = Modifier
.padding(horizontal = 16.dp)
.padding(horizontal = 16.dp)
) {
ButtonColumnMolecule {
Button(
@ -201,11 +201,14 @@ private fun LoginForm(
.fillMaxWidth()
.onTabOrEnterKeyFocusNext(focusManager)
.testTag(TestTags.loginEmailUsername)
.autofill(autofillTypes = listOf(AutofillType.Username), onFill = {
val sanitized = it.sanitize()
loginFieldState = sanitized
eventSink(LoginPasswordEvents.SetLogin(sanitized))
}),
.autofill(
autofillTypes = listOf(AutofillType.Username),
onFill = {
val sanitized = it.sanitize()
loginFieldState = sanitized
eventSink(LoginPasswordEvents.SetLogin(sanitized))
}
),
placeholder = {
Text(text = stringResource(CommonStrings.common_username))
},
@ -247,11 +250,14 @@ private fun LoginForm(
.fillMaxWidth()
.onTabOrEnterKeyFocusNext(focusManager)
.testTag(TestTags.loginPassword)
.autofill(autofillTypes = listOf(AutofillType.Password), onFill = {
val sanitized = it.sanitize()
passwordFieldState = sanitized
eventSink(LoginPasswordEvents.SetPassword(sanitized))
}),
.autofill(
autofillTypes = listOf(AutofillType.Password),
onFill = {
val sanitized = it.sanitize()
passwordFieldState = sanitized
eventSink(LoginPasswordEvents.SetPassword(sanitized))
}
),
onValueChange = {
val sanitized = it.sanitize()
passwordFieldState = sanitized