Merge pull request #117 from geryyhu/dev

fixed liveactivity issue
This commit is contained in:
Márton Kiss
2024-05-13 06:09:45 +02:00
committed by GitHub

View File

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