aboutsummaryrefslogtreecommitdiff
path: root/src/app/app.rs
diff options
context:
space:
mode:
authorJoris2022-01-09 13:39:10 +0100
committerJoris2022-01-09 13:39:10 +0100
commit5166efe517291f5c9fc6326f30651ef799d6db65 (patch)
tree36df3d65c9e7218bff2264391032ecd28001a688 /src/app/app.rs
parent99af88a840bef534540a4b273d24a8a17e7fc9b9 (diff)
Add id in event model
Diffstat (limited to 'src/app/app.rs')
-rw-r--r--src/app/app.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/app/app.rs b/src/app/app.rs
index 45904a9..d93b544 100644
--- a/src/app/app.rs
+++ b/src/app/app.rs
@@ -17,6 +17,7 @@ pub struct App {
pub events: Vec<Event>,
pub today: NaiveDate,
pub start_date: NaiveDate,
+ pub tx: Sender<Msg>,
}
impl App {
@@ -35,7 +36,7 @@ impl App {
let start_date =
NaiveDate::from_isoywd(today.year(), today.iso_week().week(), Weekday::Mon);
let events = db::list(&conn).unwrap_or(vec![]);
- let grid = calendar::grid(tx, &today, &start_date, &events);
+ let grid = calendar::create(tx.clone(), &today, &start_date, &events);
window.set_child(Some(&grid));
@@ -52,6 +53,7 @@ impl App {
events,
today,
start_date,
+ tx,
}
}
}