fix(tasks): do not show progress for activities
This commit is contained in:
parent
f6082f12f2
commit
d1720f89ae
1 changed files with 4 additions and 2 deletions
|
@ -553,9 +553,11 @@ impl TasksRelay {
|
||||||
|
|
||||||
fn get_property(&self, task: &Task, str: &str) -> String {
|
fn get_property(&self, task: &Task, str: &str) -> String {
|
||||||
let mut children = self.tasks.children_of(task).peekable();
|
let mut children = self.tasks.children_of(task).peekable();
|
||||||
|
// Only show progress for non-activities with children
|
||||||
let progress =
|
let progress =
|
||||||
self.total_progress(task.get_id())
|
children.peek()
|
||||||
.filter(|_| children.peek().is_some());
|
.filter(|_| task.is_task())
|
||||||
|
.and_then(|_| self.total_progress(task.get_id()));
|
||||||
let prog_string = progress.map_or(String::new(), |p| format!("{:2.0}%", p * 100.0));
|
let prog_string = progress.map_or(String::new(), |p| format!("{:2.0}%", p * 100.0));
|
||||||
match str {
|
match str {
|
||||||
"subtasks" => {
|
"subtasks" => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue