Use GroupedSectionHeader in the recurrence picker (#79)

This commit is contained in:
makiolaj committed 2026-11-20 12:28:38 +01:00
1 parent f42553d43a
commit 1a83dedff9
1 file changed
+5 -14
@@ -42,6 +42,7 @@ import de.jeanlucmakiola.agendula.ui.common.recurrenceText
import de.jeanlucmakiola.floret.components.DialogAmountField
import de.jeanlucmakiola.floret.components.FullScreenPicker
import de.jeanlucmakiola.floret.components.GroupedRow
import de.jeanlucmakiola.floret.components.GroupedSectionHeader
import de.jeanlucmakiola.floret.components.GroupedSurface
import de.jeanlucmakiola.floret.components.Position
import de.jeanlucmakiola.floret.components.SelectedCheck
@@ -268,8 +269,8 @@ fun RecurrencePicker(
}
}
Column(modifier = Modifier.padding(top = 16.dp)) {
SectionLabel(stringResource(R.string.recurrence_ends))
Column {
GroupedSectionHeader(stringResource(R.string.recurrence_ends))
CheckRow(
title = stringResource(R.string.recurrence_end_never),
position = Position.Top,
@@ -374,21 +375,11 @@ private fun PresetList(
)
}
@Composable
private fun SectionLabel(text: String) {
Text(
text = text,
style = MaterialTheme.typography.labelLarge,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.padding(start = 16.dp, bottom = 8.dp),
)
}
/** Whether the next occurrence keeps to the schedule or counts from completion. */
@Composable
private fun RepeatFromSection(fromCompletion: Boolean, onChange: (Boolean) -> Unit) {
Column(modifier = Modifier.padding(top = 16.dp)) {
SectionLabel(stringResource(R.string.recurrence_repeat_from))
Column {
GroupedSectionHeader(stringResource(R.string.recurrence_repeat_from))
CheckRow(
title = stringResource(R.string.recurrence_from_due),
summary = stringResource(R.string.recurrence_from_due_summary),