DaysModel: reset m_agendaNeedsUpdate when plugin sends new events

Only reset if there's an event for current date. Without that when
the applet tries to get the updated list of events and it gets the
old one (empty) due to the check at the beginning of  eventsForDate().
This commit is contained in:
Daniel Vrátil 2016-05-30 01:14:36 +02:00
parent a9bcedb94c
commit 93905e8c68

View File

@ -115,6 +115,9 @@ void DaysModel::onDataReady(const QMultiHash<QDate, CalendarEvents::EventData> &
m_eventsData.reserve(m_eventsData.size() + data.size());
m_eventsData += data;
if (data.contains(QDate::currentDate())) {
m_agendaNeedsUpdate = true;
}
layoutChanged();
Q_EMIT agendaUpdated(QDate::currentDate());
}