fix(edit): correct the recurrence picker's read-out and end handling
Review follow-ups to the picker redesign, plus the bugs it exposed. The live read-out now renders customResult itself — the exact string OK would save — instead of rebuilding a parallel rule with `interval ?: 1` and `end ?: Never` fallbacks, which let it confidently describe a rule that differed from the selected controls whenever a field was invalid. Shrink the invalid space behind it: a blank amount field reads as its visible placeholder (1 / 10) rather than as an error, and backing out of the date picker falls back to "never" instead of stranding a dateless "on a date". Only an out-of-range 0 remains invalid, and that now says so rather than greying out OK with no cause. UNTIL displayed the day after the one picked for zones behind UTC: toRRule deliberately writes the end of the chosen *local* day expressed in UTC (the provider applies UNTIL coarsely), so the read side must convert back before taking the date. Fixes the detail screen too, and untilLocalDate is extracted so it can be tested. Also: hoist a remember() out of a conditional (a slot that appears and disappears breaks positional memoisation), match GroupedSurface's 22dp corners instead of a drifted local 20dp copy, move the cards onto GroupedSurface, drop the segmented row's icon slot so longer unit labels fit, and reserve two lines so the stack stops shifting as the phrase grows with each weekday. Extract SettingsPrefs.firstDayOfWeek(scope), replacing three copies that had drifted onto different initialValues. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -149,6 +149,9 @@
|
||||
<string name="recurrence_unit_weeks">weeks</string>
|
||||
<string name="recurrence_unit_months">months</string>
|
||||
<string name="recurrence_unit_years">years</string>
|
||||
<!-- Shown in place of the live rule read-out when an amount field holds a
|
||||
value outside 1–999 (i.e. 0), so the greyed-out OK button has a reason. -->
|
||||
<string name="event_edit_recurrence_incomplete">Enter a number from 1 to 999</string>
|
||||
<string name="event_edit_recurrence_ends">Ends</string>
|
||||
<string name="event_edit_recurrence_end_never">Never</string>
|
||||
<string name="event_edit_recurrence_end_until">On a date</string>
|
||||
|
||||
Reference in New Issue
Block a user