From 0be299ef4881a5841c704768fd2a9871d373cd42 Mon Sep 17 00:00:00 2001 From: Joris Date: Sat, 12 Mar 2022 14:18:07 +0100 Subject: Only refresh visible dates Otherwise, adding a date outside of the visible ones, it created a cell outside of the calendar. --- src/gui/update.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gui/update.rs b/src/gui/update.rs index d3eb459..372fb24 100644 --- a/src/gui/update.rs +++ b/src/gui/update.rs @@ -207,7 +207,9 @@ fn refresh(app: &App, dates: &HashSet) { event::repetitions_between(&app.recurring_events, app.start_date, app.end_date); for date in dates { - calendar::refresh_date(app, *date, &repetitions) + if date >= &app.start_date && date <= &app.end_date { + calendar::refresh_date(app, *date, &repetitions) + } } } -- cgit v1.2.3