Fix reminders

pull/1/head
yflory 4 years ago
parent e7d46d6486
commit 1d9a05e782

@ -754,7 +754,18 @@ define([
Realtime.whenRealtimeSyncs(c.lm.realtime, waitFor());
if (newC) { Realtime.whenRealtimeSyncs(newC.lm.realtime, waitFor()); }
}).nThen(function () {
if (changes.start || changes.reminders) { addReminders(ctx, id, ev); }
if (newC) {
// Move reminders to the new calendar
addReminders(ctx, id, {
id: ev.id,
start: 0
});
addReminders(ctx, ev.calendarId, ev);
} else if (changes.start || changes.reminders || changes.isAllDay) {
// Update reminders
addReminders(ctx, id, ev);
}
sendUpdate(ctx, c);
if (newC) { sendUpdate(ctx, newC); }
cb();

Loading…
Cancel
Save