From 5166efe517291f5c9fc6326f30651ef799d6db65 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 9 Jan 2022 13:39:10 +0100 Subject: Add id in event model --- src/app/app.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/app/app.rs') 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, pub today: NaiveDate, pub start_date: NaiveDate, + pub tx: Sender, } 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, } } } -- cgit v1.2.3