Update lesson filtering logic to include substitute teachers in ServerSyncProvider
This commit is contained in:
@@ -280,7 +280,7 @@ class LiveCardProvider extends ChangeNotifier {
|
||||
|
||||
today = today
|
||||
.where((lesson) =>
|
||||
lesson.status?.name != "Elmaradt" &&
|
||||
(lesson.status?.name != "Elmaradt" || lesson.substituteTeacher != null) &&
|
||||
lesson.subject.id != '' &&
|
||||
!lesson.isEmpty)
|
||||
.toList();
|
||||
|
||||
@@ -167,7 +167,9 @@ class ServerSyncProvider {
|
||||
List<Lesson> _filterLessons(List<Lesson> lessons) {
|
||||
return lessons
|
||||
.where((l) =>
|
||||
l.status?.name != 'Elmaradt' && l.subject.id != '' && !l.isEmpty)
|
||||
(l.status?.name != 'Elmaradt' || l.substituteTeacher != null) &&
|
||||
l.subject.id != '' &&
|
||||
!l.isEmpty)
|
||||
.toList()
|
||||
..sort((a, b) => a.start.compareTo(b.start));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user