set info drawer state based on location

This commit is contained in:
Cilibiu Bogdan
2020-02-01 07:58:51 +02:00
parent 874392159d
commit 2ce7eb7c7d
+7 -2
View File
@@ -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