From 82cad4b9b63175f62e9f091a3de20cd1f619c11b Mon Sep 17 00:00:00 2001 From: Akshay Date: Wed, 1 Jul 2020 15:59:41 +0530 Subject: add completed markers --- src/views.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/views.rs b/src/views.rs index b18e960..77006b7 100644 --- a/src/views.rs +++ b/src/views.rs @@ -33,15 +33,22 @@ where let todo_style = Style::from(CONFIGURATION.todo_color); let future_style = Style::from(CONFIGURATION.future_color); + let goal_reached_today = self.reached_goal(Local::now().naive_utc().date()); + if goal_reached_today { + printer.with_style(goal_reached_style, |p| p.print((0, 0), "o")); + } else { + printer.with_style(todo_style, |p| p.print((0, 0), "x")); + } + printer.with_style( if !printer.focused { future_style } else { - goal_reached_style + Style::none() }, |p| { p.print( - (0, 0), + (2, 0), &format!("{:width$}", self.name(), width = CONFIGURATION.view_width), ) }, -- cgit v1.2.3