Update lesson filtering logic to include substitute teachers in ServerSyncProvider

This commit is contained in:
2026-03-17 12:05:10 +01:00
parent 2ece6bd36f
commit 90165f257c
2 changed files with 4 additions and 2 deletions

View File

@@ -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();

View File

@@ -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));
}