Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
HOTFIX: Background task no longer loads all grades
Browse files Browse the repository at this point in the history
  • Loading branch information
HarryDeKat authored Dec 31, 2023
1 parent d60b958 commit 7ad153a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/background_tasks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Future<void> backgroundCheck() async {
List<Grade> beforeFetchLatestGrades =
List.of(person.schoolYears.allGrades.useable).toList();
//Refresh grade list
await Future.wait(person.schoolYears.map(
await Future.wait(person.schoolYears.where((g) => g.grades.isNotEmpty).map(
(SchoolYear sY) => api.refreshSchoolYear(person, sY, (i, t) {})));
//Save new grade list
List<Grade> afterFetchLatestGrades =
Expand Down Expand Up @@ -166,7 +166,7 @@ void loadLatestData() {
Future.forEach(accountsToCheck, (account) async {
Api api = account.api;
Future.forEach(account.profiles, (person) async {
await Future.wait(person.schoolYears.map(
await Future.wait(person.schoolYears.where((g) => g.grades.isNotEmpty).map(
(SchoolYear sY) => api.refreshSchoolYear(person, sY, (i, t) {})));
api.refreshCalendarEvents(person);
});
Expand Down

0 comments on commit 7ad153a

Please sign in to comment.