aboutsummaryrefslogtreecommitdiff
path: root/src/habit/count.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/habit/count.rs')
-rw-r--r--src/habit/count.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/habit/count.rs b/src/habit/count.rs
index 1bdf920..d351758 100644
--- a/src/habit/count.rs
+++ b/src/habit/count.rs
@@ -84,12 +84,15 @@ impl Habit for Count {
84 if *val > 0 { 84 if *val > 0 {
85 *val -= 1 85 *val -= 1
86 } else { 86 } else {
87 *val = 0 87 self.stats.remove(&date);
88 }; 88 };
89 } 89 }
90 } 90 }
91 } else { 91 } else {
92 self.insert_entry(date, 1); 92 match event {
93 TrackEvent::Increment => self.insert_entry(date, 1),
94 _ => {}
95 };
93 } 96 }
94 } 97 }
95 fn set_view_month_offset(&mut self, offset: u32) { 98 fn set_view_month_offset(&mut self, offset: u32) {