From 7740a2ad558eb289e9d8c0b33fe43453942398e0 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sat, 18 Jul 2020 14:35:59 +0530 Subject: refactor app.rs into module: app --- src/app/mod.rs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/app/mod.rs (limited to 'src/app/mod.rs') 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 @@ +use std::default::Default; +use std::sync::mpsc::Receiver; + +use notify::{DebouncedEvent, INotifyWatcher}; + +use crate::habit::HabitWrapper; + +mod impl_self; +mod impl_view; + +pub struct StatusLine(String, String); + +pub struct App { + // holds app data + habits: Vec>, + + _file_watcher: INotifyWatcher, + file_event_recv: Receiver, + focus: usize, + view_month_offset: u32, +} + +impl Default for App { + fn default() -> Self { + App::new() + } +} -- cgit v1.2.3