diff --git a/lib/features/dashboard/dashboard_viewmodel.dart b/lib/features/dashboard/dashboard_viewmodel.dart index 8708cf6e7..46193139f 100644 --- a/lib/features/dashboard/dashboard_viewmodel.dart +++ b/lib/features/dashboard/dashboard_viewmodel.dart @@ -307,6 +307,13 @@ class DashboardViewModel extends FutureViewModel> { _sessionDays = getSessionDays(); _progress = getSessionProgress(); + _upcomingEvents = importantDates.asMap().entries.where((entry) { + DateTime date = entry.value; + DateTime now = DateTime.now(); + + return now.isAfter(date.subtract(const Duration(days: 3))) && now.isBefore(date.add(const Duration(days: 1))); + }).toList(); + _upcomingEvents = importantDates.asMap().entries.where((entry) { DateTime date = entry.value; DateTime now = DateTime.now();