fix: next week resets to monday

This commit is contained in:
Pearoo
2025-09-13 19:16:33 +02:00
committed by Armand
parent 8c4735ccb3
commit c36d656178

View File

@@ -451,13 +451,13 @@ class _HomeTimetableScreen extends FirkaState<HomeTimetableScreen>
),
onTap: () async {
var newNow = now!.add(Duration(days: 7));
now = newNow;
if (now!.getMonday().getMidnight() ==
timeNow().getMonday().getMidnight()) {
now = timeNow();
}
await initForWeek(newNow);
if (!mounted) return;
setState(() {
now = newNow;
lessons = null;
dates = null;
});
await initForWeek(newNow);
setState(() {
now = newNow;
});