forked from janek/mostr
1
0
Fork 0

fix(tasks): do not show children of non-matching states

This commit is contained in:
xeruf 2024-10-03 13:29:41 +02:00
parent fd970b3709
commit 617b1ea6d1
1 changed files with 13 additions and 11 deletions

View File

@ -381,6 +381,9 @@ impl TasksRelay {
depth: usize,
) -> Vec<&'a Task> {
iter.flat_map(move |task| {
if !self.state.matches(task) {
return vec![]
}
let new_depth = depth - 1;
if new_depth > 0 {
let mut children = self.resolve_tasks_rec(self.tasks.children_of(&task), sparse, new_depth);
@ -392,8 +395,7 @@ impl TasksRelay {
}
}
return if self.filter(task) { vec![task] } else { vec![] };
})
.collect_vec()
}).collect_vec()
}
/// Executes the given function with each task referenced by this event without marker.