diff options
author | Ricky Kresslein <rk@lakoliu.com> | 2022-04-22 10:30:19 +0300 |
---|---|---|
committer | Ricky Kresslein <rk@lakoliu.com> | 2022-04-22 10:30:19 +0300 |
commit | e3bb347a12ad929619a51b37f0ca48dcfe46b731 (patch) | |
tree | 643d2b973b003e91762af519620e34065953da64 /src/ui/tasks_group.rs | |
parent | 22b05e7c934aee734005e7ba601968334467005c (diff) | |
download | Furtherance-e3bb347a12ad929619a51b37f0ca48dcfe46b731.tar.zst |
Add tags to tasks (Issue #8)
Diffstat (limited to 'src/ui/tasks_group.rs')
-rwxr-xr-x | src/ui/tasks_group.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ui/tasks_group.rs b/src/ui/tasks_group.rs index d6da39c..2453991 100755 --- a/src/ui/tasks_group.rs +++ b/src/ui/tasks_group.rs @@ -20,6 +20,7 @@ use gtk::{glib, prelude::*}; use crate::ui::FurTaskRow; use crate::database; +use crate::settings_manager; mod imp { use super::*; @@ -85,7 +86,10 @@ impl FurTasksGroup { for task in &tasks { unique = true; for i in 0..tasks_by_name.len() { - if tasks_by_name[i][0].task_name == task.task_name { + if tasks_by_name[i][0].task_name == task.task_name + && ( ( settings_manager::get_bool("show-tags") + && tasks_by_name[i][0].tags == task.tags ) || + !settings_manager::get_bool("show-tags") ) { tasks_by_name[i].push(task.clone()); unique = false; } |