diff options
author | Akshay <[email protected]> | 2020-07-18 10:05:59 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2020-07-18 10:05:59 +0100 |
commit | 7740a2ad558eb289e9d8c0b33fe43453942398e0 (patch) | |
tree | 7537d4b2aafe941ce1bca5b66c95e62d7a06f2f6 /src/app/mod.rs | |
parent | 3eace50dfb39317fb08e5a95d6126b787c567a17 (diff) |
refactor app.rs into module: app
Diffstat (limited to 'src/app/mod.rs')
-rw-r--r-- | src/app/mod.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/app/mod.rs b/src/app/mod.rs new file mode 100644 index 0000000..f00c936 --- /dev/null +++ b/src/app/mod.rs | |||
@@ -0,0 +1,27 @@ | |||
1 | use std::default::Default; | ||
2 | use std::sync::mpsc::Receiver; | ||
3 | |||
4 | use notify::{DebouncedEvent, INotifyWatcher}; | ||
5 | |||
6 | use crate::habit::HabitWrapper; | ||
7 | |||
8 | mod impl_self; | ||
9 | mod impl_view; | ||
10 | |||
11 | pub struct StatusLine(String, String); | ||
12 | |||
13 | pub struct App { | ||
14 | // holds app data | ||
15 | habits: Vec<Box<dyn HabitWrapper>>, | ||
16 | |||
17 | _file_watcher: INotifyWatcher, | ||
18 | file_event_recv: Receiver<DebouncedEvent>, | ||
19 | focus: usize, | ||
20 | view_month_offset: u32, | ||
21 | } | ||
22 | |||
23 | impl Default for App { | ||
24 | fn default() -> Self { | ||
25 | App::new() | ||
26 | } | ||
27 | } | ||