mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
add optional dependency inject for apple notification sender
This commit is contained in:
@@ -15,14 +15,10 @@ export interface ScheduledNotificationData {
|
|||||||
export class ETANotificationScheduler {
|
export class ETANotificationScheduler {
|
||||||
public readonly secondsThresholdForNotificationToFire = 180;
|
public readonly secondsThresholdForNotificationToFire = 180;
|
||||||
|
|
||||||
private appleNotificationSender = new AppleNotificationSender()
|
constructor(private repository: GetterRepository,
|
||||||
|
private shouldActuallySendNotifications = true,
|
||||||
private _lastRefreshedTimeMs: number | undefined = undefined;
|
private appleNotificationSender = new AppleNotificationSender()
|
||||||
get lastRefreshedTimeMs() {
|
) {
|
||||||
return this._lastRefreshedTimeMs;
|
|
||||||
}
|
|
||||||
|
|
||||||
constructor(private repository: GetterRepository, private shouldActuallySendNotifications = true) {
|
|
||||||
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.etaSubscriberCallback = this.etaSubscriberCallback.bind(this);
|
||||||
|
|||||||
Reference in New Issue
Block a user