Skip to content

Commit

Permalink
Fix duplicated courses in dashboard (#926)
Browse files Browse the repository at this point in the history
* fix duplicated grades in dashboard

* [BOT] Applying version.

* Update dashboard_viewmodel.dart

---------

Co-authored-by: AmineMihoubi <[email protected]>
Co-authored-by: Samuel Montambault <[email protected]>
  • Loading branch information
3 people authored Apr 12, 2024
1 parent 59c16dd commit 91a82a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
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 @@ -526,6 +526,8 @@ class DashboardViewModel extends FutureViewModel<Map<PreferencesFlag, int>> {
courses.add(course);
}
}
// Will remove duplicated courses in the list
courses = courses.toSet().toList();
} catch (error) {
onError(error);
} finally {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: The 4th generation of ÉTSMobile, the main gateway between the Éco
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

version: 4.38.0+1
version: 4.38.1+1

environment:
sdk: ">=3.3.0 <4.0.0"
Expand Down

0 comments on commit 91a82a4

Please sign in to comment.