fix: Do not dynamically change between ime actions #434

This commit is contained in:
Artem Chepurnoy 2024-06-22 13:37:33 +03:00
parent 30d6420f5a
commit 31186607de
No known key found for this signature in database
GPG Key ID: FAC37D0CF674043E
16 changed files with 9 additions and 44 deletions

View File

@ -446,10 +446,7 @@ fun UserVerificationScreen(
testTag = "field:password",
value = content.password,
keyboardOptions = KeyboardOptions(
imeAction = when {
keyboardOnGo != null -> ImeAction.Go
else -> ImeAction.Default
},
imeAction = ImeAction.Go,
),
keyboardActions = KeyboardActions(
onGo = keyboardOnGo,

View File

@ -175,7 +175,6 @@ fun ChangePasswordScreen(
leading = {},
trailing = {},
onTextChange = query?.onChange,
onGoClick = null,
)
}
}

View File

@ -332,8 +332,7 @@ fun LoginContent(
keyboardOptions = KeyboardOptions(
imeAction = when {
!passwordIsLastField -> ImeAction.Next
keyboardOnGo != null -> ImeAction.Go
else -> ImeAction.Default
else -> ImeAction.Go
},
),
keyboardActions = KeyboardActions(
@ -363,8 +362,7 @@ fun LoginContent(
keyboardOptions = KeyboardOptions(
imeAction = when {
!clientSecretIsLastField -> ImeAction.Next
keyboardOnGo != null -> ImeAction.Go
else -> ImeAction.Default
else -> ImeAction.Go
},
),
keyboardActions = KeyboardActions(

View File

@ -418,10 +418,7 @@ private fun ColumnScope.LoginOtpScreenContentAuthenticator(
keyboardOptions = KeyboardOptions(
autoCorrect = false,
keyboardType = KeyboardType.Number,
imeAction = when {
keyboardOnGo != null -> ImeAction.Go
else -> ImeAction.Default
},
imeAction = ImeAction.Go,
),
keyboardActions = KeyboardActions(
onGo = keyboardOnGo,
@ -493,10 +490,7 @@ private fun ColumnScope.LoginOtpScreenContentEmail(
keyboardOptions = KeyboardOptions(
autoCorrect = false,
keyboardType = KeyboardType.Number,
imeAction = when {
keyboardOnGo != null -> ImeAction.Go
else -> ImeAction.Default
},
imeAction = ImeAction.Go,
),
keyboardActions = KeyboardActions(
onGo = keyboardOnGo,

View File

@ -162,10 +162,7 @@ private fun ColumnScope.ElevatedAccessContent(
testTag = "field:password",
value = content.password,
keyboardOptions = KeyboardOptions(
imeAction = when {
keyboardOnGo != null -> ImeAction.Go
else -> ImeAction.Default
},
imeAction = ImeAction.Go,
),
keyboardActions = KeyboardActions(
onGo = keyboardOnGo,

View File

@ -175,7 +175,6 @@ fun CipherFiltersListScreen(
leading = {},
trailing = {},
onTextChange = query?.onChange,
onGoClick = null,
)
}
}

View File

@ -199,7 +199,6 @@ fun WordlistViewScreen(
leading = {},
trailing = {},
onTextChange = query?.onChange,
onGoClick = null,
)
}
}

View File

@ -121,7 +121,6 @@ fun SearchSettingsScreenContent(
leading = {},
trailing = {},
onTextChange = state.query.onChange,
onGoClick = null,
)
}
}

View File

@ -62,7 +62,6 @@ fun SearchTextField(
leading: @Composable () -> Unit,
trailing: @Composable () -> Unit,
onTextChange: ((String) -> Unit)?,
onGoClick: (() -> Unit)?,
) {
val interactionSource = remember {
MutableInteractionSource()
@ -143,14 +142,9 @@ fun SearchTextField(
},
keyboardOptions = KeyboardOptions(
keyboardType = KeyboardType.Text,
imeAction = if (onGoClick != null) ImeAction.Go else ImeAction.Done,
imeAction = ImeAction.Done,
autoCorrect = false,
),
keyboardActions = KeyboardActions(
onGo = {
onGoClick?.invoke()
},
),
singleLine = true,
)
if (count != null) {

View File

@ -173,7 +173,6 @@ fun JustDeleteMeListScreen(
leading = {},
trailing = {},
onTextChange = query?.onChange,
onGoClick = null,
)
}
}

View File

@ -174,7 +174,6 @@ fun JustGetMyDataListScreen(
leading = {},
trailing = {},
onTextChange = query?.onChange,
onGoClick = null,
)
}
}

View File

@ -186,10 +186,7 @@ fun ColumnScope.SetupContent(
label = stringResource(Res.string.setup_field_app_password_label),
value = setupState.password,
keyboardOptions = KeyboardOptions(
imeAction = when {
keyboardOnGo != null -> ImeAction.Go
else -> ImeAction.Default
},
imeAction = ImeAction.Go,
),
keyboardActions = KeyboardActions(
onGo = keyboardOnGo,

View File

@ -176,10 +176,7 @@ private fun UnlockScreen(
testTag = "field:password",
value = unlockState.password,
keyboardOptions = KeyboardOptions(
imeAction = when {
keyboardOnGo != null -> ImeAction.Go
else -> ImeAction.Default
},
imeAction = ImeAction.Go,
),
keyboardActions = KeyboardActions(
onGo = keyboardOnGo,

View File

@ -171,7 +171,6 @@ fun PasskeysListScreen(
leading = {},
trailing = {},
onTextChange = query?.onChange,
onGoClick = null,
)
}
}

View File

@ -171,7 +171,6 @@ fun TwoFaServiceListScreen(
leading = {},
trailing = {},
onTextChange = query?.onChange,
onGoClick = null,
)
}
}

View File

@ -49,7 +49,6 @@ fun CustomSearchbarContent(
}
},
onTextChange = searchFieldModel.onChange,
onGoClick = null,
)
}
}