diff --git a/refilc/lib/api/providers/live_card_provider.dart b/refilc/lib/api/providers/live_card_provider.dart index 6cf5c6e..bb71bac 100644 --- a/refilc/lib/api/providers/live_card_provider.dart +++ b/refilc/lib/api/providers/live_card_provider.dart @@ -15,9 +15,10 @@ enum LiveCardState { duringLesson, duringBreak, morning, + weekendMorning, afternoon, night, - summary + summary, } class LiveCardProvider extends ChangeNotifier { @@ -297,7 +298,11 @@ class LiveCardProvider extends ChangeNotifier { } else if (now.hour >= 20) { currentState = LiveCardState.night; } else if (now.hour >= 5 && now.hour <= 10) { - currentState = LiveCardState.morning; + if (nextLesson == null || now.weekday == 6 || now.weekday == 7) { + currentState = LiveCardState.empty; + } else { + currentState = LiveCardState.morning; + } } else { currentState = LiveCardState.empty; } diff --git a/refilc_mobile_ui/lib/pages/home/home_page.dart b/refilc_mobile_ui/lib/pages/home/home_page.dart index 8a7218e..b05a055 100644 --- a/refilc_mobile_ui/lib/pages/home/home_page.dart +++ b/refilc_mobile_ui/lib/pages/home/home_page.dart @@ -213,7 +213,7 @@ class HomePageState extends State with TickerProviderStateMixin { // } // TODO: REMOVE IN PRODUCTION BUILD!!! - // print(_liveCard.currentState); + print(_liveCard.currentState); // _liveCard.currentState = LiveCardState.duringLesson; return Scaffold(