Skip to content

Commit

Permalink
[nemo-qml-plugin-calendar] Increase revision of the base event when a…
Browse files Browse the repository at this point in the history
…dding an exception.
  • Loading branch information
dcaliste committed Jun 9, 2020
1 parent 0cd9e2b commit 6f068d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/calendarworker.cpp
Expand Up @@ -111,11 +111,15 @@ void CalendarWorker::deleteEvent(const QString &uid, const KDateTime &recurrence
return;

if (event->recurs() && dateTime.isValid()) {
// We're deleting an occurrence from a recurring event.
// No incidence is deleted from the database in that case,
// only the base incidence is modified by adding an exDate.
event->recurrence()->addExDateTime(KDateTime(dateTime, KDateTime::Spec(KDateTime::LocalZone)));
event->setRevision(event->revision() + 1);
} else {
mCalendar->deleteEvent(event);
mExceptionEvents.append(QPair<QString, QDateTime>(uid, dateTime));
}
mExceptionEvents.append(QPair<QString, QDateTime>(uid, dateTime));
}

void CalendarWorker::deleteAll(const QString &uid)
Expand Down

0 comments on commit 6f068d2

Please sign in to comment.