From d3fce38235af3bac9ac96557b72a438f82d3de36 Mon Sep 17 00:00:00 2001 From: Armand <4831c0@proton.me> Date: Sun, 7 Sep 2025 16:30:28 +0200 Subject: [PATCH] tt: switch to monday if the week isn't the current one closes #44 --- firka/lib/ui/phone/pages/home/home_timetable.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/firka/lib/ui/phone/pages/home/home_timetable.dart b/firka/lib/ui/phone/pages/home/home_timetable.dart index 2e8231a..7206297 100644 --- a/firka/lib/ui/phone/pages/home/home_timetable.dart +++ b/firka/lib/ui/phone/pages/home/home_timetable.dart @@ -118,7 +118,12 @@ class _HomeTimetableScreen extends State { setState(() { this.dates = dates; - setActiveToToday(); + if (now.getMonday().getMidnight().millisecondsSinceEpoch == + timeNow().getMonday().getMidnight().millisecondsSinceEpoch) { + setActiveToToday(); + } else { + active = 0; + } }); }