diff --git a/src/app/pages/home/home-page.component.ts b/src/app/pages/home/home-page.component.ts index 853172e..1e067f4 100644 --- a/src/app/pages/home/home-page.component.ts +++ b/src/app/pages/home/home-page.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, OnDestroy } from '@angular/core'; import { Observable, Subscription, of } from 'rxjs'; import { catchError, exhaustMap, map, tap, take } from 'rxjs/operators'; @@ -17,7 +17,7 @@ import { RPCSubscriber } from '@overflow/commons/ui/decorator/RPCSubscriber'; templateUrl: './home-page.component.html', styleUrls: ['./home-page.component.scss'], }) -export class HomePageComponent implements OnInit { +export class HomePageComponent implements OnInit, OnDestroy { blockedPanel = false; @@ -27,12 +27,15 @@ export class HomePageComponent implements OnInit { constructor( private probeService: ProbeService, ) { - this.probeService.subscribeNotification(this); } ngOnInit() { + this.probeService.subscribeNotification(this); } + ngOnDestroy(): void { + this.probeService.unsubscribeNotification(this); + } blockDocument() { this.blockedDocument = true;