1
0
forked from firka/firka

tt: switch to monday if the week isn't the current one

closes #44
This commit is contained in:
2025-09-07 16:43:37 +02:00
parent d3fce38235
commit f55ec7c525

View File

@@ -349,6 +349,11 @@ class _HomeTimetableScreen extends State<HomeTimetableScreen> {
),
onTap: () async {
var newNow = now!.add(Duration(days: 7));
now = newNow;
if (now!.getMonday().getMidnight() ==
timeNow().getMonday().getMidnight()) {
now = timeNow();
}
await initForWeek(newNow);
setState(() {
now = newNow;