mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-02 17:23:20 +00:00
Add create/modify button when creating/editing a task
This commit is contained in:
parent
e2b0c1ac74
commit
3650ddaccc
6 changed files with 69 additions and 39 deletions
|
@ -32,6 +32,7 @@ class Task
|
|||
void setDate(const Date &date);
|
||||
void setEvent(const Event &event);
|
||||
void setChecked(bool checked);
|
||||
void unschedule();
|
||||
|
||||
int id() const;
|
||||
int sourceId() const;
|
||||
|
|
6
external/mirai-core/src/Task.cpp
vendored
6
external/mirai-core/src/Task.cpp
vendored
|
@ -70,6 +70,12 @@ void Task::setDate(const Date &date)
|
|||
data_->updateTask(id(), {.dayId = day.value().id, .eventId = emptyEventId});
|
||||
}
|
||||
|
||||
void Task::unschedule()
|
||||
{
|
||||
auto emptyId = std::optional<std::optional<int>>(std::optional<int>(std::nullopt));
|
||||
data_->updateTask(id(), {.dayId = emptyId, .eventId = emptyId});
|
||||
}
|
||||
|
||||
void Task::setEvent(const Event &event)
|
||||
{
|
||||
auto emptyDayId = std::optional<std::optional<int>>(std::optional<int>(std::nullopt));
|
||||
|
|
2
external/selenite
vendored
2
external/selenite
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 1774720377afc932cb92303516e049f66d8bf7a0
|
||||
Subproject commit 65e2a75a09df205a86a09d9dd4f1ca916bb115a3
|
Loading…
Add table
Add a link
Reference in a new issue