Add current time indicator of the current day on the Calendar

This commit is contained in:
Vyn 2024-11-06 18:38:42 +01:00
parent ab2200ecc1
commit e2cd994026
9 changed files with 54 additions and 8 deletions

View file

@ -6,6 +6,7 @@
#include "View.h"
#include "utils.h"
#include <algorithm>
#include <iostream>
#include <iterator>
#include <ranges>
@ -104,6 +105,13 @@ void View::update()
auto tasks = source->getUnscheduledTasks();
unscheduledTasks_.insert(unscheduledTasks_.end(), tasks.begin(), tasks.end());
}
for (auto &date : dates) {
auto &events = date.second.events;
std::sort(events.begin(), events.end(), [](const Event &a, const Event &b) {
return a.startsAt() < b.startsAt();
});
}
}
void View::removeSources()