Revert "[AAE-5874] Re-evaluate extension rules when context changes" (#2301)

* Revert "[AAE-5874] Re-evaluate extension rules when context changes (#2296)"

This reverts commit fb140531f4.

* [ci:force]
This commit is contained in:
Popovics András
2021-09-16 22:55:16 +02:00
committed by Denys Vuika
parent 38cdbfa9c1
commit de355cc300
17 changed files with 239 additions and 408 deletions

View File

@@ -23,13 +23,12 @@
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { Component, ViewEncapsulation, Output, EventEmitter, OnInit, Input, OnDestroy } from '@angular/core';
import { Component, ViewEncapsulation, Output, EventEmitter, OnInit, Input } from '@angular/core';
import { Store } from '@ngrx/store';
import { Observable, Subject } from 'rxjs';
import { Observable } from 'rxjs';
import { ContentActionRef } from '@alfresco/adf-extensions';
import { AppStore, getHeaderColor, getAppName, getLogoPath, getHeaderImagePath } from '@alfresco/aca-shared/store';
import { AppExtensionService } from '@alfresco/aca-shared';
import { takeUntil } from 'rxjs/operators';
@Component({
selector: 'app-header',
@@ -38,8 +37,7 @@ import { takeUntil } from 'rxjs/operators';
encapsulation: ViewEncapsulation.None,
host: { class: 'app-header' }
})
export class AppHeaderComponent implements OnInit, OnDestroy {
private onDestroy$: Subject<boolean> = new Subject<boolean>();
export class AppHeaderComponent implements OnInit {
@Output()
toggleClicked = new EventEmitter();
@@ -62,17 +60,7 @@ export class AppHeaderComponent implements OnInit, OnDestroy {
}
ngOnInit() {
this.appExtensions
.getHeaderActions()
.pipe(takeUntil(this.onDestroy$))
.subscribe((actions) => {
this.actions = actions;
});
}
ngOnDestroy() {
this.onDestroy$.next(true);
this.onDestroy$.complete();
this.actions = this.appExtensions.getHeaderActions();
}
trackByActionId(_: number, action: ContentActionRef) {