mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-02 01:13:19 +00:00
Add current time indicator of the current day on the Calendar
This commit is contained in:
parent
ab2200ecc1
commit
e2cd994026
9 changed files with 54 additions and 8 deletions
8
external/mirai-core/src/View.cpp
vendored
8
external/mirai-core/src/View.cpp
vendored
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue