Update live_information.dart
This commit is contained in:
parent
074b19ae92
commit
d39a304d73
1 changed files with 2 additions and 1 deletions
|
|
@ -82,7 +82,8 @@ class LiveInformation {
|
||||||
if (audioPlayer.state != AudioWrapper_State.Playing) {
|
if (audioPlayer.state != AudioWrapper_State.Playing) {
|
||||||
if (announcementQueue.isNotEmpty) {
|
if (announcementQueue.isNotEmpty) {
|
||||||
|
|
||||||
if (announcementQueue.first.scheduledTime != null && announcementQueue.first.scheduledTime!.isAfter(DateTime.now())) {
|
// Is the announcement in the queue ready to be announced? (is within 100ms of the current time)
|
||||||
|
if (announcementQueue.first.timestamp != null && announcementQueue.first.timestamp!.isAfter(DateTime.now().add(Duration(milliseconds: 100)))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue