Skip to content

Commit

Permalink
reminders text semandtic
Browse files Browse the repository at this point in the history
  • Loading branch information
seamuslowry committed Sep 14, 2024
1 parent 159b20c commit ce7f7c2
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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()
Expand All @@ -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
Expand Down

0 comments on commit ce7f7c2

Please sign in to comment.