fixed cleanup of annotations after exclude/include
This commit is contained in:
parent
d2aaa46522
commit
439b43ae0d
@ -466,7 +466,16 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async _reloadFile(file: File): Promise<void> {
|
private async _reloadFile(file: File): Promise<void> {
|
||||||
|
const previousFile = this.fileData?.file;
|
||||||
await this._loadFileData(file);
|
await this._loadFileData(file);
|
||||||
|
|
||||||
|
const fileHasBeenExcludedOrIncluded = previousFile?.excluded !== this.fileData?.file?.excluded;
|
||||||
|
const excludedPagesHaveChanged = JSON.stringify(previousFile?.excludedPages) !== JSON.stringify(this.fileData?.file?.excludedPages);
|
||||||
|
if (fileHasBeenExcludedOrIncluded || excludedPagesHaveChanged) {
|
||||||
|
await this._deleteAnnotations();
|
||||||
|
await this._cleanupAndRedrawAnnotations();
|
||||||
|
}
|
||||||
|
|
||||||
await this._stampPDF();
|
await this._stampPDF();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user