diff --git a/src/app/components/page.component.ts b/src/app/components/page.component.ts index ed0e259d2..3c76019d0 100644 --- a/src/app/components/page.component.ts +++ b/src/app/components/page.component.ts @@ -32,7 +32,7 @@ import { OnDestroy, OnInit, ViewChild } from '@angular/core'; import { Store } from '@ngrx/store'; import { MinimalNodeEntity, MinimalNodeEntryEntity } from '@alfresco/js-api'; import { Observable, Subject, Subscription } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; +import { takeUntil, map } from 'rxjs/operators'; import { AppExtensionService } from '../extensions/extension.service'; import { ContentManagementService } from '../services/content-management.service'; import { @@ -76,7 +76,12 @@ export abstract class PageComponent implements OnInit, OnDestroy { ngOnInit() { this.sharedPreviewUrl$ = this.store.select(getSharedUrl); - this.infoDrawerOpened$ = this.store.select(isInfoDrawerOpened); + this.infoDrawerOpened$ = this.store.select(isInfoDrawerOpened).pipe( + map(infoDrawerState => { + return !this.isOutletPreviewUrl() && infoDrawerState; + }) + ); + this.documentDisplayMode$ = this.store.select(getDocumentDisplayMode); this.store