liveactivities bug fix

- Forget to add LiveCardState check to the end, so to avoid create-end activity loop, I added currentstate check.
This commit is contained in:
Geryy 2024-05-13 19:06:25 +02:00 committed by GitHub
parent 365bd7957e
commit f579270886
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -362,7 +362,7 @@ class LiveCardProvider extends ChangeNotifier {
} }
//END //END
if (hasActivityStarted && nextLesson != null && if ((currentState == LiveCardState.afternoon || currentState == LiveCardState.morning || currentState == LiveCardState.night) && hasActivityStarted && nextLesson != null &&
nextLesson!.start.difference(now).inMinutes > 60) { nextLesson!.start.difference(now).inMinutes > 60) {
debugPrint("Több, mint 1 óra van az első óráig. Befejezés..."); debugPrint("Több, mint 1 óra van az első óráig. Befejezés...");
PlatformChannel.endLiveActivity(); PlatformChannel.endLiveActivity();