mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-05 19:13:20 +00:00
Fix the 'show completed tasks' feature
This commit is contained in:
parent
e94ed17de9
commit
cf30a47c68
4 changed files with 7 additions and 4 deletions
2
external/selenite
vendored
2
external/selenite
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 099b5edb0fa7c2fb016a348af448ff6b715844c3
|
Subproject commit f154762629f5690d58098d86a99a9e51a00253b2
|
|
@ -485,7 +485,8 @@ void app_logic::update_tasks_view()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for (auto &task : source_group.tasks) {
|
for (auto &task : source_group.tasks) {
|
||||||
if (task.has_due_date() && task.due_date() < today) {
|
if (task.has_due_date() && task.due_date() < today
|
||||||
|
&& _should_hide_completed_tasks) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
new_slint_tasks->push_back(
|
new_slint_tasks->push_back(
|
||||||
|
@ -554,10 +555,12 @@ void app_logic::hide_all_sources()
|
||||||
|
|
||||||
void app_logic::show_completed_tasks()
|
void app_logic::show_completed_tasks()
|
||||||
{
|
{
|
||||||
|
_should_hide_completed_tasks = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void app_logic::hide_completed_tasks()
|
void app_logic::hide_completed_tasks()
|
||||||
{
|
{
|
||||||
|
_should_hide_completed_tasks = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool app_logic::should_hide_completed_tasks() const
|
bool app_logic::should_hide_completed_tasks() const
|
||||||
|
|
|
@ -21,8 +21,8 @@ export component AddEventModal inherits Modal {
|
||||||
titleInput := VTextInput {
|
titleInput := VTextInput {
|
||||||
label: "title";
|
label: "title";
|
||||||
}
|
}
|
||||||
VText { text: "on"; vertical-alignment: bottom;}
|
|
||||||
dateInput := VDatePicker {
|
dateInput := VDatePicker {
|
||||||
|
label: "on";
|
||||||
enabled: true;
|
enabled: true;
|
||||||
}
|
}
|
||||||
HorizontalLayout {
|
HorizontalLayout {
|
||||||
|
|
|
@ -42,7 +42,7 @@ export component SideBar inherits Rectangle {
|
||||||
vertical-stretch: 1;
|
vertical-stretch: 1;
|
||||||
VerticalLayout {
|
VerticalLayout {
|
||||||
vertical-stretch: 1;
|
vertical-stretch: 1;
|
||||||
spacing: 4px;
|
spacing: 8px;
|
||||||
for source[index] in AppModels.sidebar-view.sources: HorizontalLayout {
|
for source[index] in AppModels.sidebar-view.sources: HorizontalLayout {
|
||||||
alignment: space-between;
|
alignment: space-between;
|
||||||
VText {
|
VText {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue