builttoroam / device_calendar

A cross platform plugin for modifying calendars on the user's device
https://pub.dev/packages/device_calendar
BSD 3-Clause "New" or "Revised" License
259 stars 258 forks source link

Add eventid customization #518

Open CatinoRosalba opened 7 months ago

CatinoRosalba commented 7 months ago

Problem Creating a new event loaded from a ics file, within it is included a uid which I would like to be the event id. Initially, since I have the ability to assign a value to it, I thought it would actually assign it, but in reality once the event is created, the eventid is overwritten with a causal id.

Why implement it Having a custom eventid and not auto-generated (as it currently is) allows me to perform checks on its existence and be able to determine consequent actions. For example, avoid duplicate events and rather modify it.

How I am currently solving I am solving by creating a local database and then saving the events there, with the custom uid, but it would be nice to be able to manage it through the library itself.

N.B. In case this possibility already exists and I am doing something wrong, I withdraw my request and thank you for any tip.

hamishjohnson commented 7 months ago

This is key for 2 way sync I believe

CatinoRosalba commented 7 months ago

Yes, in fact entering the event with an ics file was just the beginning of event synchronization development. Perhaps, however, regardless of synchronization actions, having control over the event id would also allow better management of device events.