cat-documents-ng 0.3.88 → 0.3.90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5348,13 +5348,14 @@ class DocumentViewerService {
5348
5348
  * Updates the selected document and recalculates all computed properties
5349
5349
  * @param document The selected document
5350
5350
  */
5351
- updateSelectedDocument(document) {
5351
+ updateSelectedDocument(document, skipLoadDocumentHistory = false) {
5352
5352
  this.documentService.set(document);
5353
5353
  const alertData = this.getAlertData(document);
5354
5354
  const documentStatus = this.calculateDocumentStatus(document);
5355
5355
  const documentIsUploaded = this.calculateIsDocumentUploaded(document);
5356
5356
  this.documentStore.updateDocumentViewerState(document, undefined, undefined, undefined, documentStatus, documentIsUploaded, alertData);
5357
- this.loadDocumentHistory(document._id);
5357
+ if (!skipLoadDocumentHistory && document?._id)
5358
+ this.loadDocumentHistory(document._id);
5358
5359
  }
5359
5360
  /**
5360
5361
  * Loads document history data
@@ -6271,7 +6272,7 @@ class DocumentHistoryComponent {
6271
6272
  // Ensure the viewer service has the latest selected document (with _id from history)
6272
6273
  // eslint-disable-next-line no-console
6273
6274
  try {
6274
- this.documentViewerService.updateSelectedDocument?.(this.selectedDocument);
6275
+ this.documentViewerService.updateSelectedDocument?.(this.selectedDocument, true);
6275
6276
  }
6276
6277
  catch { }
6277
6278
  const deleteAction = this.documentActionsService.createDeleteAction();