aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-07-10 18:06:08 +0100
committerAkshay <[email protected]>2020-07-10 18:06:08 +0100
commit27a925262bfd4a70f251226c17b43749b9fd81bb (patch)
tree2beeaba9ae879664a2437f6d92a27edfe53db0fe
parentb6ea375485083860094a904b7a6c7d97fa42b8f8 (diff)
add directories crate, simplify done status
-rw-r--r--Cargo.toml1
-rw-r--r--src/views.rs4
2 files changed, 3 insertions, 2 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 593963b..532842e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,6 +11,7 @@ serde_json = "1.0"
11lazy_static = "1.4.0" 11lazy_static = "1.4.0"
12erased-serde = "0.3" 12erased-serde = "0.3"
13typetag = "0.1.4" 13typetag = "0.1.4"
14directories = "3.0.1"
14 15
15[dependencies.cursive] 16[dependencies.cursive]
16version = "0.14" 17version = "0.14"
diff --git a/src/views.rs b/src/views.rs
index 64c85ce..d25e59b 100644
--- a/src/views.rs
+++ b/src/views.rs
@@ -39,7 +39,7 @@ where
39 let todo_style = Style::from(CONFIGURATION.todo_color); 39 let todo_style = Style::from(CONFIGURATION.todo_color);
40 let future_style = Style::from(CONFIGURATION.future_color); 40 let future_style = Style::from(CONFIGURATION.future_color);
41 41
42 let done_today_style = Style::from(Effect::Strikethrough); 42 let strikethrough = Style::from(Effect::Strikethrough);
43 43
44 let goal_status = 44 let goal_status =
45 self.view_month_offset() == 0 && self.reached_goal(Local::now().naive_utc().date()); 45 self.view_month_offset() == 0 && self.reached_goal(Local::now().naive_utc().date());
@@ -47,7 +47,7 @@ where
47 printer.with_style( 47 printer.with_style(
48 Style::merge(&[ 48 Style::merge(&[
49 if goal_status { 49 if goal_status {
50 done_today_style 50 strikethrough
51 } else { 51 } else {
52 Style::none() 52 Style::none()
53 }, 53 },