Skip to content

Commit

Permalink
fix duplicated grades in dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
AmineMihoubi committed Feb 6, 2024
1 parent 4d64350 commit ec3a183
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/core/viewmodels/dashboard_viewmodel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class DashboardViewModel extends FutureViewModel<Map<PreferencesFlag, int>> {
}

/// List of courses for the current session
final List<Course> courses = [];
List<Course> courses = [];

DashboardViewModel({@required AppIntl intl}) : _appIntl = intl;

Expand Down Expand Up @@ -528,6 +528,8 @@ class DashboardViewModel extends FutureViewModel<Map<PreferencesFlag, int>> {
courses.add(course);
}
}
// Will remove duplicated courses in the list
courses = courses.toSet().toList();
}
}).whenComplete(() {
setBusyForObject(courses, false);
Expand Down

0 comments on commit ec3a183

Please sign in to comment.