listen to shuttle ETA updates in the scheduler constructor

This commit is contained in:
2025-03-27 10:58:20 -07:00
parent ef94a9aa7e
commit f2a2dd74f6

View File

@@ -17,8 +17,9 @@ export class ETANotificationScheduler {
) { ) {
this.etaSubscriberCallback = this.etaSubscriberCallback.bind(this); this.etaSubscriberCallback = this.etaSubscriberCallback.bind(this);
this.sendEtaNotificationImmediately = this.sendEtaNotificationImmediately.bind(this); this.sendEtaNotificationImmediately = this.sendEtaNotificationImmediately.bind(this);
this.etaSubscriberCallback = this.etaSubscriberCallback.bind(this);
this.sendEtaNotificationImmediatelyIfSecondsRemainingBelowThreshold = this.sendEtaNotificationImmediatelyIfSecondsRemainingBelowThreshold.bind(this); this.sendEtaNotificationImmediatelyIfSecondsRemainingBelowThreshold = this.sendEtaNotificationImmediatelyIfSecondsRemainingBelowThreshold.bind(this);
this.shuttleRepository.subscribeToEtaUpdates(this.etaSubscriberCallback);
} }
private async sendEtaNotificationImmediately(notificationData: ScheduledNotification): Promise<boolean> { private async sendEtaNotificationImmediately(notificationData: ScheduledNotification): Promise<boolean> {