1
0
mirror of https://github.com/etesync/android synced 2024-11-15 20:38:58 +00:00

VEVENT exceptions always get master UID

* make sure that VEVENT exceptions always the the UID of the master event (fixes #523)
This commit is contained in:
Ricki Hirner 2015-07-28 18:19:41 +02:00
parent 41bae221f0
commit 7c1b787410

View File

@ -214,7 +214,7 @@ public class Event extends iCalendar {
// "master event" (without exceptions)
ComponentList components = ical.getComponents();
VEvent master = toVEvent();
VEvent master = toVEvent(new Uid(uid));
components.add(master);
// remember used time zones
@ -227,10 +227,7 @@ public class Event extends iCalendar {
// recurrence exceptions
for (Event exception : exceptions) {
// create VEVENT for exception
VEvent vException = exception.toVEvent();
// set UID to UID of master event
vException.getProperties().add(master.getProperty(Property.UID));
VEvent vException = exception.toVEvent(master.getUid());
components.add(vException);
@ -255,12 +252,12 @@ public class Event extends iCalendar {
return os;
}
protected VEvent toVEvent() {
protected VEvent toVEvent(Uid uid) {
VEvent event = new VEvent();
PropertyList props = event.getProperties();
if (uid != null)
props.add(new Uid(uid));
props.add(uid);
if (recurrenceId != null)
props.add(recurrenceId);