From a99810fea37c9200c6be1174c23dedce10b28611 Mon Sep 17 00:00:00 2001 From: George Date: Thu, 30 Mar 2023 16:53:19 +0300 Subject: [PATCH] RED-6412, remove unused imports, add trackby to stop flickering. --- .../annotation-wrapper/annotation-wrapper.component.ts | 1 - .../components/annotations-list/annotations-list.component.html | 2 +- .../components/annotations-list/annotations-list.component.ts | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.ts b/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.ts index 4d0c61752..1fd6e3c88 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.ts @@ -1,6 +1,5 @@ import { Component, HostBinding, Input, OnChanges } from '@angular/core'; import { AnnotationWrapper } from '@models/file/annotation.wrapper'; -import { MultiSelectService } from '../../services/multi-select.service'; import { AnnotationsListingService } from '../../services/annotations-listing.service'; import { PdfProxyService } from '../../services/pdf-proxy.service'; import { ScrollableParentViews } from '@iqser/common-ui'; diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.html b/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.html index c93113416..ac61e425b 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.html @@ -1,4 +1,4 @@ - +
diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.ts b/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.ts index b52637e79..2f793856f 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.ts @@ -22,6 +22,7 @@ export class AnnotationsListComponent extends HasScrollbarDirective implements O @Output() readonly pagesPanelActive = new EventEmitter(); readonly earmarkGroups$ = new BehaviorSubject([]); + protected readonly _trackBy = (index: number, listItem: ListItem) => listItem.item.id; constructor( protected readonly _elementRef: ElementRef,