diff --git a/src/app/components/shared/comment-page/comment-page.component.ts b/src/app/components/shared/comment-page/comment-page.component.ts index 210cba4f31e52ba425cc80435f247efb4d74f3b4..52c8116d60b0111b143dc20a557a6ab633dad1b1 100644 --- a/src/app/components/shared/comment-page/comment-page.component.ts +++ b/src/app/components/shared/comment-page/comment-page.component.ts @@ -72,18 +72,11 @@ export class CommentPageComponent implements OnInit, OnDestroy, AfterContentInit } } }); - const deviceType = localStorage.getItem('deviceType'); - if (this.user.role === 3 && deviceType === 'desktop') { - Rescale.requestFullscreen(); - } } ngOnDestroy() { this.listenerFn(); this.eventService.makeFocusOnInputFalse(); - if (this.user.role === 3) { - Rescale.exitFullscreen(); - } } public announce() { diff --git a/src/app/components/shared/questionwall/question-wall/question-wall.component.ts b/src/app/components/shared/questionwall/question-wall/question-wall.component.ts index 1d72d8c0fb5a33fe27db078a386ca0934befa9f5..545da523da09a16caa2e874327ca8b689893f999 100644 --- a/src/app/components/shared/questionwall/question-wall/question-wall.component.ts +++ b/src/app/components/shared/questionwall/question-wall/question-wall.component.ts @@ -110,11 +110,11 @@ export class QuestionWallComponent implements OnInit, AfterViewInit, OnDestroy { } ngAfterViewInit(): void { + document.getElementById('header_rescale').style.display = 'none'; + document.getElementById('footer_rescale').style.display = 'none'; setTimeout(() => { Rescale.requestFullscreen(); }, 10); - document.getElementById('header_rescale').style.display = 'none'; - document.getElementById('footer_rescale').style.display = 'none'; } ngOnDestroy(): void { @@ -122,6 +122,7 @@ export class QuestionWallComponent implements OnInit, AfterViewInit, OnDestroy { window.clearInterval(this.timeUpdateInterval); document.getElementById('header_rescale').style.display = 'block'; document.getElementById('footer_rescale').style.display = 'block'; + Rescale.exitFullscreen(); } nextComment() {