Removed extra setups from file actions
This commit is contained in:
parent
e9a6597e62
commit
0878f5af92
@ -6,8 +6,6 @@ import {
|
||||
HostBinding,
|
||||
Input,
|
||||
OnChanges,
|
||||
OnDestroy,
|
||||
OnInit,
|
||||
Optional,
|
||||
ViewChild,
|
||||
} from '@angular/core';
|
||||
@ -15,7 +13,6 @@ import { PermissionsService } from '@services/permissions.service';
|
||||
import { Action, ActionTypes, Dossier, File } from '@red/domain';
|
||||
import { DossiersDialogService } from '../../../services/dossiers-dialog.service';
|
||||
import {
|
||||
AutoUnsubscribe,
|
||||
CircleButtonType,
|
||||
CircleButtonTypes,
|
||||
ConfirmationDialogInput,
|
||||
@ -34,7 +31,6 @@ import { FilesService } from '@services/entity-services/files.service';
|
||||
import { ReanalysisService, ReanalyzeQueryParams } from '@services/reanalysis.service';
|
||||
import { Router } from '@angular/router';
|
||||
import { ExcludedPagesService } from '../../../../file-preview/services/excluded-pages.service';
|
||||
import { tap } from 'rxjs/operators';
|
||||
import { DocumentInfoService } from '../../../../file-preview/services/document-info.service';
|
||||
import { ExpandableFileActionsComponent } from '@shared/components/expandable-file-actions/expandable-file-actions.component';
|
||||
import { firstValueFrom, Observable } from 'rxjs';
|
||||
@ -47,7 +43,7 @@ import { PageRotationService } from '../../../../file-preview/services/page-rota
|
||||
styleUrls: ['./file-actions.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class FileActionsComponent extends AutoUnsubscribe implements OnDestroy, OnInit, OnChanges {
|
||||
export class FileActionsComponent implements OnChanges {
|
||||
readonly circleButtonTypes = CircleButtonTypes;
|
||||
readonly currentUser = this._userService.currentUser;
|
||||
|
||||
@ -79,7 +75,6 @@ export class FileActionsComponent extends AutoUnsubscribe implements OnDestroy,
|
||||
canToggleAnalysis = false;
|
||||
showToggleAnalysis = false;
|
||||
showStatusBar = false;
|
||||
showOpenDocument = false;
|
||||
showReanalyseFilePreview = false;
|
||||
showReanalyseDossierOverview = false;
|
||||
analysisForced = false;
|
||||
@ -111,9 +106,7 @@ export class FileActionsComponent extends AutoUnsubscribe implements OnDestroy,
|
||||
private readonly _router: Router,
|
||||
private readonly _changeRef: ChangeDetectorRef,
|
||||
private readonly _redactionImportService: RedactionImportService,
|
||||
) {
|
||||
super();
|
||||
}
|
||||
) {}
|
||||
|
||||
@HostBinding('class.keep-visible')
|
||||
get expanded() {
|
||||
@ -267,13 +260,6 @@ export class FileActionsComponent extends AutoUnsubscribe implements OnDestroy,
|
||||
].filter(btn => btn.show);
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.addSubscription = this._activeDossiersService
|
||||
.getEntityChanged$(this.file.dossierId)
|
||||
.pipe(tap(() => this._setup()))
|
||||
.subscribe();
|
||||
}
|
||||
|
||||
ngOnChanges() {
|
||||
this._setup();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user