aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-07-02 17:59:20 +0100
committerAkshay <[email protected]>2020-07-02 17:59:20 +0100
commit9017fa0c3974a15b0216e3d2643d25ef9fc21624 (patch)
tree5958ca8db2d17614d6879ff426d978fd2beadbcf /src
parent1ce6cd2f2ea71da37373d158bc465fbd6797044c (diff)
fix focus-on-delete bug
Diffstat (limited to 'src')
-rw-r--r--src/app.rs11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/app.rs b/src/app.rs
index 276b7ff..4ea342f 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -254,18 +254,9 @@ impl View for App {
254 self.set_focus(Absolute::Down); 254 self.set_focus(Absolute::Down);
255 return EventResult::Consumed(None); 255 return EventResult::Consumed(None);
256 } 256 }
257 Event::Char('a') => {
258 let mut gymming = Count::new("gym", 5);
259 gymming.insert_entry(NaiveDate::from_ymd(2020, 4, 11), 7);
260 gymming.insert_entry(NaiveDate::from_ymd(2020, 4, 12), 8);
261 gymming.insert_entry(NaiveDate::from_ymd(2020, 4, 13), 9);
262 gymming.insert_entry(NaiveDate::from_ymd(2020, 4, 14), 10);
263 gymming.insert_entry(NaiveDate::from_ymd(2020, 4, 15), 11);
264 self.add_habit(Box::new(gymming));
265 return EventResult::Consumed(None);
266 }
267 Event::Char('d') => { 257 Event::Char('d') => {
268 self.habits.remove(self.focus); 258 self.habits.remove(self.focus);
259 self.focus = 0;
269 return EventResult::Consumed(None); 260 return EventResult::Consumed(None);
270 } 261 }
271 Event::Char('w') => { 262 Event::Char('w') => {