Skip to content

Commit 57eb071

Browse files
committed
Unnecessary function
1 parent 31190cb commit 57eb071

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

src/lib/components/ng-http-loader.component.ts

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,6 @@ export class NgHttpLoaderComponent implements OnDestroy, OnInit {
4545
public entryComponent: any = null;
4646

4747
constructor(private pendingInterceptorService: PendingInterceptorService, private spinnerVisibilityService: SpinnerVisibilityService) {
48-
this.initializeSubscription();
49-
}
50-
51-
ngOnInit(): void {
52-
this.nullifySpinnerIfEntryComponentIsDefined();
53-
this.initFilters();
54-
}
55-
56-
ngOnDestroy(): void {
57-
this.subscriptions.unsubscribe();
58-
}
59-
60-
private initializeSubscription() {
6148
const [showSpinner$, hideSpinner$] = partition((h: boolean) => h)(this.pendingInterceptorService.pendingRequestsStatus$);
6249

6350
this.subscriptions = merge(
@@ -73,6 +60,15 @@ export class NgHttpLoaderComponent implements OnDestroy, OnInit {
7360
.subscribe(h => this.handleSpinnerVisibility(h));
7461
}
7562

63+
ngOnInit(): void {
64+
this.nullifySpinnerIfEntryComponentIsDefined();
65+
this.initFilters();
66+
}
67+
68+
ngOnDestroy(): void {
69+
this.subscriptions.unsubscribe();
70+
}
71+
7672
private nullifySpinnerIfEntryComponentIsDefined(): void {
7773
if (null != this.entryComponent) {
7874
this.spinner = null;

0 commit comments

Comments
 (0)