fixed liveactivity issue
- Fixed a bug where if it's less than one hour before the first class, the LiveActivity is created, but if the user rolls back the time to more than one hour before the first class, the LiveActivity does not end."
This commit is contained in:
parent
75ba5405bb
commit
d24c4ec187
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user