From f57927088603329d6a97336c20edcc05c916e649 Mon Sep 17 00:00:00 2001 From: Geryy <33695813+geryyhu@users.noreply.github.com> Date: Mon, 13 May 2024 19:06:25 +0200 Subject: [PATCH] liveactivities bug fix - Forget to add LiveCardState check to the end, so to avoid create-end activity loop, I added currentstate check. --- refilc/lib/api/providers/live_card_provider.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/refilc/lib/api/providers/live_card_provider.dart b/refilc/lib/api/providers/live_card_provider.dart index 0446178..d1d2922 100644 --- a/refilc/lib/api/providers/live_card_provider.dart +++ b/refilc/lib/api/providers/live_card_provider.dart @@ -362,7 +362,7 @@ class LiveCardProvider extends ChangeNotifier { } //END - if (hasActivityStarted && nextLesson != null && + if ((currentState == LiveCardState.afternoon || currentState == LiveCardState.morning || currentState == LiveCardState.night) && hasActivityStarted && nextLesson != null && nextLesson!.start.difference(now).inMinutes > 60) { debugPrint("Több, mint 1 óra van az első óráig. Befejezés..."); PlatformChannel.endLiveActivity();