aboutsummaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorJoris2022-03-12 14:18:07 +0100
committerJoris2022-03-12 14:18:07 +0100
commit0be299ef4881a5841c704768fd2a9871d373cd42 (patch)
tree06ab6d302a5fc226f442fd06f1a8b81b627a245c /src/gui
parentce499a2842876232318b37811bac0cd074017d2f (diff)
Only refresh visible dates
Otherwise, adding a date outside of the visible ones, it created a cell outside of the calendar.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/update.rs4
1 files changed, 3 insertions, 1 deletions
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<NaiveDate>) {
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)
+ }
}
}