diff --git a/firka/lib/helpers/settings.dart b/firka/lib/helpers/settings.dart index cd580a72..ff284f0a 100644 --- a/firka/lib/helpers/settings.dart +++ b/firka/lib/helpers/settings.dart @@ -35,6 +35,7 @@ const liveActivityEnabled = 1019; const liveActivityPrivacyEverDeclined = 1020; const morningNotificationEnabled = 1021; const morningNotificationTime = 1022; +const ttToastABTimetable = 1023; bool always() { return true; @@ -427,6 +428,13 @@ class SettingsStore { l10n.tt_settings_toast_lesson_breaks, true, always), + "ab_timetable": SettingsBoolean( + ttToastABTimetable, + FirkaIconType.majesticons, + Majesticon.calendarSolid, + l10n.tt_settings_toast_lesson_ab_timetable, + true, + always), }), never, null), diff --git a/firka/lib/ui/phone/pages/home/home_timetable.dart b/firka/lib/ui/phone/pages/home/home_timetable.dart index 320b7742..0363b0ac 100644 --- a/firka/lib/ui/phone/pages/home/home_timetable.dart +++ b/firka/lib/ui/phone/pages/home/home_timetable.dart @@ -361,7 +361,10 @@ class _HomeTimetableScreen extends FirkaState if (lessons != null && tests != null && events != null && dates != null) { List ttWidgets = []; List ttDays = []; - + final showABTimetable = widget.data.settings + .group("settings") + .subGroup("timetable_toast") + .boolean("ab_timetable"); // Build navigation icons using original dates for (var i = 0; i < dates!.length; i++) { final date = dates![i]; @@ -577,16 +580,18 @@ class _HomeTimetableScreen extends FirkaState style: appStyle.fonts.B_16R .apply(color: appStyle.colors.textPrimary)), SizedBox(width: 4), - Text("•", - style: appStyle.fonts.B_16R - .apply(color: appStyle.colors.accent)), - SizedBox(width: 4), - Text( - now!.isAWeek() - ? widget.data.l10n.a_week - : widget.data.l10n.b_week, - style: appStyle.fonts.B_16R - .apply(color: appStyle.colors.textPrimary)), + if (showABTimetable) ...[ + Text("•", + style: appStyle.fonts.B_16R + .apply(color: appStyle.colors.accent)), + SizedBox(width: 4), + Text( + now!.isAWeek() + ? widget.data.l10n.a_week + : widget.data.l10n.b_week, + style: appStyle.fonts.B_16R + .apply(color: appStyle.colors.textPrimary)), + ] ], ), onTap: () {