something

This commit is contained in:
Marton Kiss
2025-01-27 18:21:17 +01:00
parent 4101dc7c17
commit 8b49007cca
9 changed files with 31 additions and 9 deletions

View File

@@ -108,7 +108,9 @@ class TimetableController extends ChangeNotifier {
// Jump to next week on weekends
if (skip &&
(days?.length ?? 0) > 0 &&
days!.last.last.end.isBefore(DateTime.now())) return next(context);
days!.last.last.end.isBefore(DateTime.now())) {
return next(context);
}
notifyListeners();
}
@@ -149,7 +151,9 @@ class TimetableController extends ChangeNotifier {
lessons.sort((a, b) => a.date.compareTo(b.date));
for (var lesson in lessons) {
if (days.last.isNotEmpty &&
_differentDate(lesson.date, days.last.last.date)) days.add([]);
_differentDate(lesson.date, days.last.last.date)) {
days.add([]);
}
days.last.add(lesson);
}