Fix the 'show completed tasks' feature

This commit is contained in:
Vyn 2025-07-04 11:04:10 +02:00
parent e94ed17de9
commit cf30a47c68
Signed by: vyn
GPG key ID: E1B2BE34E7A971E7
4 changed files with 7 additions and 4 deletions

2
external/selenite vendored

@ -1 +1 @@
Subproject commit 099b5edb0fa7c2fb016a348af448ff6b715844c3
Subproject commit f154762629f5690d58098d86a99a9e51a00253b2

View file

@ -485,7 +485,8 @@ void app_logic::update_tasks_view()
continue;
}
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;
}
new_slint_tasks->push_back(
@ -554,10 +555,12 @@ void app_logic::hide_all_sources()
void app_logic::show_completed_tasks()
{
_should_hide_completed_tasks = false;
}
void app_logic::hide_completed_tasks()
{
_should_hide_completed_tasks = true;
}
bool app_logic::should_hide_completed_tasks() const

View file

@ -21,8 +21,8 @@ export component AddEventModal inherits Modal {
titleInput := VTextInput {
label: "title";
}
VText { text: "on"; vertical-alignment: bottom;}
dateInput := VDatePicker {
label: "on";
enabled: true;
}
HorizontalLayout {

View file

@ -42,7 +42,7 @@ export component SideBar inherits Rectangle {
vertical-stretch: 1;
VerticalLayout {
vertical-stretch: 1;
spacing: 4px;
spacing: 8px;
for source[index] in AppModels.sidebar-view.sources: HorizontalLayout {
alignment: space-between;
VText {