|
1 | | -import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'; |
| 1 | +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy } from '@angular/core'; |
2 | 2 |
|
3 | 3 | import { Subscription } from 'rxjs'; |
4 | 4 |
|
@@ -30,7 +30,7 @@ import { NotifierNotificationComponent } from './notifier-notification.component |
30 | 30 | selector: 'notifier-container', |
31 | 31 | templateUrl: './notifier-container.component.html' |
32 | 32 | } ) |
33 | | -export class NotifierContainerComponent implements OnDestroy, OnInit { |
| 33 | +export class NotifierContainerComponent implements OnDestroy { |
34 | 34 |
|
35 | 35 | /** |
36 | 36 | * List of currently somewhat active notifications |
@@ -74,17 +74,14 @@ export class NotifierContainerComponent implements OnDestroy, OnInit { |
74 | 74 | this.queueService = notifierQueueService; |
75 | 75 | this.config = notifierService.getConfig(); |
76 | 76 | this.notifications = []; |
77 | | - } |
78 | 77 |
|
79 | | - /** |
80 | | - * Component initialization lifecycle hook, connects this component to the action queue, and then handles incoming actions |
81 | | - */ |
82 | | - public ngOnInit(): void { |
| 78 | + // Connects this component up to the action queue, then handle incoming actions |
83 | 79 | this.queueServiceSubscription = this.queueService.actionStream.subscribe( ( action: NotifierAction ) => { |
84 | 80 | this.handleAction( action ).then( () => { |
85 | 81 | this.queueService.continue(); |
86 | 82 | } ); |
87 | 83 | } ); |
| 84 | + |
88 | 85 | } |
89 | 86 |
|
90 | 87 | /** |
|
0 commit comments