Skip to content

Commit

Permalink
Remove model from view
Browse files Browse the repository at this point in the history
  • Loading branch information
chababeric committed Dec 2, 2024
1 parent 1ec772d commit 0369213
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/features/dashboard/dashboard_viewmodel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,13 @@ class DashboardViewModel extends FutureViewModel<Map<PreferencesFlag, int>> {
_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();
Expand Down

0 comments on commit 0369213

Please sign in to comment.