Skip to content

Added UID control#74

Open
zachbornheimer wants to merge 1 commit intonwcell:masterfrom
zachbornheimer:zachbornheimer-uid-manipulation
Open

Added UID control#74
zachbornheimer wants to merge 1 commit intonwcell:masterfrom
zachbornheimer:zachbornheimer-uid-manipulation

Conversation

@zachbornheimer
Copy link

Apple Calendar and Google Calendar both have an issue if you download and add multiple calendars with the same UID and it will, randomly, overwrite data with each. This patch adds 3 new functions:
.setUID(str)
.autoUID(bool)
.getUID(event_title, default)

This allows for each event to have a unique ID. setUID has the highest precedence so you can use a custom hashing function, if desired, or any other manual modification to the UID. This should be run before addEvent. The autoUID may be set as well to allow for multiple events to have automatic UIDs based on their title and dates.

Apple Calendar and Google Calendar both have an issue if you download and add multiple calendars with the same UID and it will, randomly, overwrite data with each.  This patch adds 3 new functions:
.setUID(str)
.autoUID(bool)
.getUID(event_title, default)

This allows for each event to have a unique ID.  setUID has the highest precedence so you can use a custom hashing function, if desired, or any other manual modification to the UID.  This should be run before addEvent.  The autoUID may be set as well to allow for multiple events to have automatic UIDs based on their title and dates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant