RED-5460 - filtered 'changeLogRemoved' redactions in preview mode

This commit is contained in:
Valentin Mihai 2022-11-04 17:34:11 +02:00
parent a8d016c6d5
commit 2a8e048a53
2 changed files with 9 additions and 3 deletions

View File

@ -15,6 +15,7 @@ import { MatDialogRef, MatDialogState } from '@angular/material/dialog';
import scrollIntoView from 'scroll-into-view-if-needed';
import {
AutoUnsubscribe,
bool,
CircleButtonTypes,
Debounce,
FilterService,
@ -383,8 +384,11 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnDestroy
return;
}
if (this._viewModeService.isRedacted && !this._userPreferencesService.getShowSuggestionsInPreview()) {
annotations = annotations.filter(a => !a.isSuggestion);
if (this._viewModeService.isRedacted) {
annotations = annotations.filter(a => !bool(a.isChangeLogRemoved));
if (!this._userPreferencesService.getShowSuggestionsInPreview()) {
annotations = annotations.filter(a => !a.isSuggestion);
}
}
this.displayedAnnotations = this._annotationProcessingService.filterAndGroupAnnotations(annotations, primary, secondary);

View File

@ -239,7 +239,9 @@ export class FilePreviewScreenComponent
break;
}
case ViewModes.REDACTED: {
const nonRedactionEntries = annotations.filter(a => !bool(a.getCustomData('redaction')));
const nonRedactionEntries = annotations.filter(
a => !bool(a.getCustomData('redaction')) || bool(a.getCustomData('changeLogRemoved')),
);
if (this._readableRedactionsService.active) {
this._setAnnotationsOpacity(redactions, true);
this._setAnnotationsColor(redactions, 'annotationColor');