forked from janek/mostr
1
0
Fork 0

fix(tasks): recursive time tracked format string

This commit is contained in:
xeruf 2024-08-07 15:04:57 +03:00
parent 50ac994d21
commit fca9b1492b
1 changed files with 2 additions and 1 deletions

View File

@ -353,8 +353,9 @@ impl Tasks {
.map_or(String::new(), |p| format!("{:2.0}%", p * 100.0)), .map_or(String::new(), |p| format!("{:2.0}%", p * 100.0)),
"path" => self.get_task_path(Some(task.event.id)), "path" => self.get_task_path(Some(task.event.id)),
"rpath" => self.relative_path(task.event.id), "rpath" => self.relative_path(task.event.id),
// TODO format strings as config
"time" => display_time("MMMm", self.time_tracked(*task.get_id())), "time" => display_time("MMMm", self.time_tracked(*task.get_id())),
"rtime" => display_time("HH:MMm", self.total_time_tracked(*task.get_id())), "rtime" => display_time("HH:MM", self.total_time_tracked(*task.get_id())),
prop => task.get(prop).unwrap_or(String::new()), prop => task.get(prop).unwrap_or(String::new()),
}) })
.collect::<Vec<String>>() .collect::<Vec<String>>()