From e3bb347a12ad929619a51b37f0ca48dcfe46b731 Mon Sep 17 00:00:00 2001 From: Ricky Kresslein Date: Fri, 22 Apr 2022 10:30:19 +0300 Subject: Add tags to tasks (Issue #8) --- src/ui/tasks_group.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/ui/tasks_group.rs') 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; } -- cgit 1.4.1