implemented recurrence exception (EXDATE) support for custom events, refactored timetable break and holiday generation logic, and refined RRule editor UI/theming and tile layouts

This commit is contained in:
2026-05-14 12:58:29 +02:00
parent 194d8d1857
commit 2cb8321d07
8 changed files with 221 additions and 48 deletions
@@ -7,6 +7,7 @@ import '../../../../widget/centered_leading.dart';
import '../../../../widget/debug/debug_tile.dart';
import '../../../../widget/details_bottom_sheet.dart';
import '../custom_events/custom_event_edit_dialog.dart';
import '../data/rrule_with_exceptions.dart';
import 'delete_custom_event.dart';
class CustomEventSheet {
@@ -78,7 +79,13 @@ class CustomEventSheet {
return const Text('Keine weiteren Vorkommnisse');
}
if (snapshot.data == null) return const Text('...');
final rrule = RecurrenceRule.fromString(event.rrule);
// Strip the rrule_generator-specific `;EXDATE=…` suffix
// first — `package:rrule` is strict and throws on it.
final parsed = parseRRuleWithExceptions(event.rrule);
if (parsed.rule.isEmpty) {
return const Text('Keine weiteren Vorkommnisse');
}
final rrule = RecurrenceRule.fromString(parsed.rule);
if (!rrule.canFullyConvertToText) {
return const Text('Keine genauere Angabe möglich.');
}