laptop
This commit is contained in:
@@ -175,7 +175,7 @@ class AnnouncementModule extends InfoModule {
|
||||
bool sendToServer = true
|
||||
}) async {
|
||||
|
||||
if (sendToServer) {
|
||||
if (sendToServer && _shouldSendToServer()) {
|
||||
|
||||
scheduledTime ??= liveInformation.syncedTimeModule.Now().add(Duration(seconds: defaultAnnouncementDelay));
|
||||
|
||||
@@ -230,7 +230,7 @@ class AnnouncementModule extends InfoModule {
|
||||
bool sendToServer = true
|
||||
}) {
|
||||
|
||||
if (sendToServer) {
|
||||
if (sendToServer && _shouldSendToServer()) {
|
||||
|
||||
scheduledTime ??= liveInformation.syncedTimeModule.Now().add(Duration(seconds: defaultAnnouncementDelay));
|
||||
|
||||
@@ -260,7 +260,7 @@ class AnnouncementModule extends InfoModule {
|
||||
bool sendToServer = true
|
||||
}) async {
|
||||
|
||||
if (sendToServer) {
|
||||
if (sendToServer && _shouldSendToServer()) {
|
||||
|
||||
scheduledTime ??= liveInformation.syncedTimeModule.Now().add(Duration(seconds: defaultAnnouncementDelay));
|
||||
|
||||
@@ -324,6 +324,14 @@ class AnnouncementModule extends InfoModule {
|
||||
queue.add(announcement);
|
||||
}
|
||||
|
||||
// Server check
|
||||
bool _shouldSendToServer() {
|
||||
bool condition = liveInformation.roomCode != null;
|
||||
|
||||
print("Should send to server? " + (condition.toString()));
|
||||
return condition;
|
||||
}
|
||||
|
||||
// Constants
|
||||
|
||||
final List<NamedAnnouncementQueueEntry> manualAnnouncements = [
|
||||
|
||||
Reference in New Issue
Block a user