diff options
author | Akshay <[email protected]> | 2020-07-12 10:09:51 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2020-07-12 10:09:51 +0100 |
commit | 6f572a1384cfa2aa7cc0c0412b762d03a55f3024 (patch) | |
tree | 004fe0421a5c7b1c5fd7751c6f13eb7997a74833 /src/app.rs | |
parent | ec875633e34614cfa656c4e0dbb35cddcca38d14 (diff) |
improve spacing, line counting; add Week mode to enums
Diffstat (limited to 'src/app.rs')
-rw-r--r-- | src/app.rs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -287,16 +287,16 @@ impl View for App { | |||
287 | if self.habits.is_empty() { | 287 | if self.habits.is_empty() { |
288 | return EventResult::Consumed(None); | 288 | return EventResult::Consumed(None); |
289 | } | 289 | } |
290 | if self.habits[self.focus].view_mode() == ViewMode::Month { | 290 | if self.habits[self.focus].view_mode() == ViewMode::Week { |
291 | self.set_mode(ViewMode::Day) | 291 | self.set_mode(ViewMode::Day) |
292 | } else { | 292 | } else { |
293 | self.set_mode(ViewMode::Month) | 293 | self.set_mode(ViewMode::Week) |
294 | } | 294 | } |
295 | return EventResult::Consumed(None); | 295 | return EventResult::Consumed(None); |
296 | } | 296 | } |
297 | Event::Char('V') => { | 297 | Event::Char('V') => { |
298 | for habit in self.habits.iter_mut() { | 298 | for habit in self.habits.iter_mut() { |
299 | habit.set_view_mode(ViewMode::Month); | 299 | habit.set_view_mode(ViewMode::Week); |
300 | } | 300 | } |
301 | return EventResult::Consumed(None); | 301 | return EventResult::Consumed(None); |
302 | } | 302 | } |