mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 00:23:03 +00:00
build: upgrade to angular v12
This commit is contained in:
@@ -44,7 +44,7 @@ export class ScheduleProvider implements OnDestroy {
|
||||
private _uuidSubscription?: Subscription;
|
||||
|
||||
constructor(private readonly dataProvider: DataProvider) {
|
||||
window.addEventListener('storage', this.storageEventListener.bind(this));
|
||||
window.addEventListener('storage', this.storageListener);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -87,9 +87,9 @@ export class ScheduleProvider implements OnDestroy {
|
||||
}
|
||||
|
||||
/**
|
||||
* Listen to updates in local storage
|
||||
* What to do when local storage updates
|
||||
*/
|
||||
private storageEventListener(event: StorageEvent) {
|
||||
private storageEventHandler(event: StorageEvent) {
|
||||
if (
|
||||
event.newValue &&
|
||||
event.storageArea === localStorage &&
|
||||
@@ -99,6 +99,11 @@ export class ScheduleProvider implements OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Listen to updates in local storage
|
||||
*/
|
||||
private storageListener = this.storageEventHandler.bind(this);
|
||||
|
||||
/**
|
||||
* Load Date Series
|
||||
*/
|
||||
@@ -192,6 +197,6 @@ export class ScheduleProvider implements OnDestroy {
|
||||
*/
|
||||
ngOnDestroy(): void {
|
||||
this._uuidSubscription?.unsubscribe();
|
||||
window.removeEventListener('storage', this.storageEventListener.bind(this));
|
||||
window.removeEventListener('storage', this.storageListener);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user