summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkshay <nerdy@peppe.rs>2020-07-01 15:59:41 +0530
committerAkshay <nerdy@peppe.rs>2020-07-01 15:59:41 +0530
commit82cad4b9b63175f62e9f091a3de20cd1f619c11b (patch)
treedeb64dfb3a551c378729079205ec67aa4e555874
parentf96c3b4a68c60ec52b3e6a1097896780642f7245 (diff)
add completed markers
-rw-r--r--src/views.rs11
1 files changed, 9 insertions, 2 deletions
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),
)
},