feat(edit): move an event to another calendar (#39) #73
Reference in New Issue
Block a user
Delete Branch "feat/change-event-calendar"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Lets you change which calendar an existing event belongs to, straight from the editor — resolves #39.
What changed
CalendarRepository.moveEvent/CalendarDataSource.moveEventimplementing the move.How the move works
CALENDAR_IDis sync-adapter-owned and can't be updated in place, so it's copy + delete (the Google Calendar / Etar approach):DTSTART/RRULE/DURATION/RDATE/EXDATE) andUID_2445preserved so instance times line up and backup-dedup / sync identity survive.CONTENT_EXCEPTION_URI, cancellations asSTATUS_CANCELED.updateEvent.A calendar change forces whole-series scope, so it skips the recurring scope dialog. Colour is intentionally not carried across (a raw/keyed colour may be invalid on the target account), matching the existing calendar-switch behaviour.
Tests
EventWriteMapperTest— moved-master + copied-exception value builders (recurrence skeleton, DURATION-not-DTEND, no colour).CalendarRepositoryImplTest—moveEventdelegation + failure propagation.EventEditViewModelTest(new) — calendar change routes tomoveEventnotupdateEvent; recurring move skips the scope dialog; non-move recurring edit still asks for scope../gradlew test lint assembleDebuggreen.On-device
Verified on the emulator (single event, recurring series with modified + cancelled occurrences, calendar-change + field edit in one save).
🤖 Generated with Claude Code