From ce7f7c29cb771d7510fcc229ee96cf7e431bc87b Mon Sep 17 00:00:00 2001 From: Seamus Lowry Date: Sat, 14 Sep 2024 07:59:50 -0400 Subject: [PATCH] reminders text semandtic --- .../daytracker/ui/screens/settings/SettingsScreen.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/seamuslowry/daytracker/ui/screens/settings/SettingsScreen.kt b/app/src/main/java/seamuslowry/daytracker/ui/screens/settings/SettingsScreen.kt index 8f242ec..0960c5c 100644 --- a/app/src/main/java/seamuslowry/daytracker/ui/screens/settings/SettingsScreen.kt +++ b/app/src/main/java/seamuslowry/daytracker/ui/screens/settings/SettingsScreen.kt @@ -129,6 +129,7 @@ fun ReminderSection( var pickingTime by remember { mutableStateOf(false) } val context = LocalContext.current val requiredPermission = Manifest.permission.POST_NOTIFICATIONS + val remindersText = stringResource(R.string.reminders_section_title) LaunchedEffect(key1 = reminderEnabled) { if (reminderEnabled && ContextCompat.checkSelfPermission(context, requiredPermission) != PackageManager.PERMISSION_GRANTED) { @@ -137,7 +138,7 @@ fun ReminderSection( } Column(modifier = modifier) { - Text(text = stringResource(R.string.reminders_section_title), modifier = Modifier.padding(vertical = 8.dp), style = MaterialTheme.typography.headlineSmall) + Text(text = remindersText, modifier = Modifier.padding(vertical = 8.dp), style = MaterialTheme.typography.headlineSmall) Row( modifier = Modifier .fillMaxWidth() @@ -146,7 +147,7 @@ fun ReminderSection( horizontalArrangement = Arrangement.SpaceBetween, ) { Text(text = stringResource(R.string.enabled)) - Switch(checked = reminderEnabled, onCheckedChange = onSetReminderEnabled) + Switch(checked = reminderEnabled, onCheckedChange = onSetReminderEnabled, modifier = Modifier.semantics { contentDescription = remindersText }) } Row( modifier = Modifier