diff --git a/src/app/components/creator/room-creator-page/room-creator-page.component.ts b/src/app/components/creator/room-creator-page/room-creator-page.component.ts index 3ef8a36d9bb53d069b3333c01ac68180a3187759..f74f46aa17e5067bc03b9a3f179fb60cc86bb39b 100644 --- a/src/app/components/creator/room-creator-page/room-creator-page.component.ts +++ b/src/app/components/creator/room-creator-page/room-creator-page.component.ts @@ -37,6 +37,7 @@ export class RoomCreatorPageComponent extends RoomPageComponent implements OnIni deviceType = localStorage.getItem('deviceType'); viewModuleCount = 1; moderatorCommentCounter: number; + commentCounterEmitSubscription: any; urlToCopy = `${window.location.protocol}//${window.location.hostname}/participant/room/`; constructor(protected roomService: RoomService, @@ -53,10 +54,18 @@ export class RoomCreatorPageComponent extends RoomPageComponent implements OnIni public eventService: EventService, public titleService: TitleService) { super(roomService, route, location, wsCommentService, commentService, eventService); - this.commentCounterEmit.subscribe(e => this.titleService.attachTitle('(' + e + ')')); + this.commentCounterEmitSubscription = this.commentCounterEmit.subscribe(e => { + this.titleService.attachTitle('(' + e + ')'); + }); langService.langEmitter.subscribe(lang => translateService.use(lang)); } + ngOnDestroy() { + super.ngOnDestroy(); + this.commentCounterEmitSubscription.unsubscribe(); + this.titleService.resetTitle(); + } + ngAfterContentInit(): void { setTimeout( () => { document.getElementById('live_announcer-button').focus();