Skip to content

Commit

Permalink
Merge branch 'visible' into 'master'
Browse files Browse the repository at this point in the history
[nemo-qml-plugin-calendar] Don't assume that rawEvents list filter out events on visibility.  Contributes to JB#47814

See merge request mer-core/nemo-qml-plugin-calendar!66
  • Loading branch information
chriadam committed Dec 15, 2020
2 parents c850001 + 3a56f08 commit a232e1d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/calendarworker.cpp
Expand Up @@ -744,16 +744,18 @@ void CalendarWorker::loadData(const QList<CalendarData::Range> &ranges,
// Load all recurring incidences, we have no other way to detect if they occur within a range
mStorage->loadRecurringIncidences();

KCalCore::Event::List list = mCalendar->rawEvents();

if (reset)
mSentEvents.clear();

QMultiHash<QString, CalendarData::Event> events;
QMultiHash<QString, KDateTime> allDay;
bool orphansDeleted = false;

foreach (const KCalCore::Event::Ptr e, list) {
const KCalCore::Event::List list = mCalendar->rawEvents();
for (const KCalCore::Event::Ptr e : list) {
if (!mCalendar->isVisible(e)) {
continue;
}
// The database may have changed after loading the events, make sure that the notebook
// of the event still exists.
mKCal::Notebook::Ptr notebook = mStorage->notebook(mCalendar->notebook(e));
Expand Down

0 comments on commit a232e1d

Please sign in to comment.