mirror of
https://github.com/etesync/android
synced 2025-06-05 23:58:50 +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:
parent
41bae221f0
commit
7c1b787410
@ -214,7 +214,7 @@ public class Event extends iCalendar {
|
|||||||
|
|
||||||
// "master event" (without exceptions)
|
// "master event" (without exceptions)
|
||||||
ComponentList components = ical.getComponents();
|
ComponentList components = ical.getComponents();
|
||||||
VEvent master = toVEvent();
|
VEvent master = toVEvent(new Uid(uid));
|
||||||
components.add(master);
|
components.add(master);
|
||||||
|
|
||||||
// remember used time zones
|
// remember used time zones
|
||||||
@ -227,10 +227,7 @@ public class Event extends iCalendar {
|
|||||||
// recurrence exceptions
|
// recurrence exceptions
|
||||||
for (Event exception : exceptions) {
|
for (Event exception : exceptions) {
|
||||||
// create VEVENT for exception
|
// create VEVENT for exception
|
||||||
VEvent vException = exception.toVEvent();
|
VEvent vException = exception.toVEvent(master.getUid());
|
||||||
|
|
||||||
// set UID to UID of master event
|
|
||||||
vException.getProperties().add(master.getProperty(Property.UID));
|
|
||||||
|
|
||||||
components.add(vException);
|
components.add(vException);
|
||||||
|
|
||||||
@ -255,12 +252,12 @@ public class Event extends iCalendar {
|
|||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected VEvent toVEvent() {
|
protected VEvent toVEvent(Uid uid) {
|
||||||
VEvent event = new VEvent();
|
VEvent event = new VEvent();
|
||||||
PropertyList props = event.getProperties();
|
PropertyList props = event.getProperties();
|
||||||
|
|
||||||
if (uid != null)
|
if (uid != null)
|
||||||
props.add(new Uid(uid));
|
props.add(uid);
|
||||||
if (recurrenceId != null)
|
if (recurrenceId != null)
|
||||||
props.add(recurrenceId);
|
props.add(recurrenceId);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user