mirror of
https://github.com/bitwarden/android.git
synced 2025-12-10 20:07:59 -06:00
PM-24075: Update Dynamic colors copy (#5560)
This commit is contained in:
parent
9ed59e61a3
commit
d32b4c7c7e
@ -121,8 +121,7 @@ fun AppearanceScreen(
|
||||
Spacer(modifier = Modifier.height(height = 8.dp))
|
||||
if (state.isDynamicColorsSupported) {
|
||||
BitwardenSwitch(
|
||||
label = stringResource(id = R.string.dynamic_colors),
|
||||
supportingText = stringResource(id = R.string.dynamic_colors_description),
|
||||
label = stringResource(id = R.string.use_dynamic_colors),
|
||||
isChecked = state.isDynamicColorsEnabled,
|
||||
onCheckedChange = remember(viewModel) {
|
||||
{ viewModel.trySendAction(AppearanceAction.DynamicColorsToggle(it)) }
|
||||
@ -169,7 +168,7 @@ private fun AppearanceDialogs(
|
||||
when (dialogState) {
|
||||
AppearanceState.DialogState.EnableDynamicColors -> {
|
||||
BitwardenTwoButtonDialog(
|
||||
title = stringResource(id = R.string.dynamic_colors),
|
||||
title = stringResource(id = R.string.use_dynamic_colors_question),
|
||||
message = stringResource(
|
||||
id = R.string.dynamic_colors_may_not_adhere_to_accessibility_guidelines,
|
||||
),
|
||||
|
||||
@ -968,9 +968,9 @@ Do you want to switch to this account?</string>
|
||||
<string name="view_text_send">View text Send</string>
|
||||
<string name="delete_send">Delete Send</string>
|
||||
<string name="missing_send_resync_your_vault">Missing Send re-sync your vault</string>
|
||||
<string name="dynamic_colors">Dynamic colors</string>
|
||||
<string name="dynamic_colors_description">Apply dynamic colors based on your wallpaper</string>
|
||||
<string name="dynamic_colors_may_not_adhere_to_accessibility_guidelines">Dynamic colors uses the system colors and may not meet all accessibility guidelines.</string>
|
||||
<string name="use_dynamic_colors">Use dynamic colors</string>
|
||||
<string name="use_dynamic_colors_question">Use dynamic colors?</string>
|
||||
<string name="dynamic_colors_may_not_adhere_to_accessibility_guidelines">This color scheme automatically applies system colors to Bitwarden based on your current wallpaper. These colors may not meet all accessibility guidelines.</string>
|
||||
<string name="passkey_operation_failed_because_browser_x_is_not_trusted">Passkey operation failed because browser (%1$s) is not recognized. Select \"Trust\" to add %1$s to the list of locally trusted applications.</string>
|
||||
<string name="passkey_operation_failed_because_the_browser_is_not_trusted">Passkey operation failed because the browser is not trusted.</string>
|
||||
<string name="trust">Trust</string>
|
||||
|
||||
@ -207,21 +207,21 @@ class AppearanceScreenTest : BitwardenComposeTest() {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `dynamic colors should be displayed based on state`() {
|
||||
composeTestRule.onNodeWithText("Dynamic colors")
|
||||
fun `use dynamic colors should be displayed based on state`() {
|
||||
composeTestRule.onNodeWithText("Use dynamic colors")
|
||||
.performScrollTo()
|
||||
.assertIsDisplayed()
|
||||
|
||||
mutableStateFlow.update {
|
||||
it.copy(isDynamicColorsSupported = false)
|
||||
}
|
||||
composeTestRule.onNodeWithText("Dynamic colors")
|
||||
composeTestRule.onNodeWithText("Use dynamic colors")
|
||||
.assertIsNotDisplayed()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `on DynamicColorsToggle should send DynamicColorsToggle`() {
|
||||
composeTestRule.onNodeWithText("Dynamic colors")
|
||||
composeTestRule.onNodeWithText("Use dynamic colors")
|
||||
.performScrollTo()
|
||||
.performClick()
|
||||
verify { viewModel.trySendAction(AppearanceAction.DynamicColorsToggle(true)) }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user