Commit 19aa3fde authored by Glen Ditchfield's avatar Glen Ditchfield 🐛
Browse files

Display recurring to-dos on their due date/time in the agenda view

The agenda view displays non-recurring to-dos on their due date, and at
their due time-of-day if they are not all-day todos.  However, it displays
all-day recurring to-dos on their *start* date, and other recurring to-dos on
their *start* date but at their *due* time-of-day.

This patch displays all to-dos on their due date.
parent 06b1cede
......@@ -1864,7 +1864,11 @@ bool AgendaView::displayIncidence(const KCalendarCore::Incidence::Ptr &incidence
startDateTimeWithOffset, lastVisibleDateTime);
while (rIt.hasNext()) {
rIt.next();
const auto occurrenceDate = rIt.occurrenceStartDate().toLocalTime();
auto occurrenceDate = rIt.occurrenceStartDate().toLocalTime();
if (const auto todo = CalendarSupport::todo(rIt.incidence())) {
// Recurrence exceptions may have durations different from the normal recurrences.
occurrenceDate = occurrenceDate.addSecs(todo->dtStart().secsTo(todo->dtDue()));
}
const bool makesDayBusy
= preferences()->colorAgendaBusyDays() && makesWholeDayBusy(rIt.incidence());
if (makesDayBusy) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment