A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Fix: ensure documentDeleted subscription is discarded (#14247)
shamoonc9f7f2cfbe01
diff --git a/src-ui/src/app/components/document-list/document-list.component.spec.ts b/src-ui/src/app/components/document-list/document-list.component.spec.tsindex 3ef7a7ffa..798abc1c8 100644--- a/src-ui/src/app/components/document-list/document-list.component.spec.ts+++ b/src-ui/src/app/components/document-list/document-list.component.spec.ts@@ -146,6 +146,19 @@ describe('DocumentListComponent', () => {expect(reloadSpy).toHaveBeenCalled()})+ it('should stop reloading on document deleted after destroy', () => {+ const reloadSpy = jest.spyOn(documentListService, 'reload')+ const documentDeletedSubject = new Subject<boolean>()+ jest+ .spyOn(websocketStatusService, 'onDocumentDeleted')+ .mockReturnValue(documentDeletedSubject)+ fixture.detectChanges()+ fixture.destroy()+ reloadSpy.mockClear()+ documentDeletedSubject.next(true)+ expect(reloadSpy).not.toHaveBeenCalled()+ })+it('should show score sort fields on fulltext queries', () => {documentListService.setFilterRules([{diff --git a/src-ui/src/app/components/document-list/document-list.component.ts b/src-ui/src/app/components/document-list/document-list.component.tsindex 358d94547..48e4841f3 100644--- a/src-ui/src/app/components/document-list/document-list.component.ts+++ b/src-ui/src/app/components/document-list/document-list.component.ts@@ -270,9 +270,12 @@ export class DocumentListComponentthis.list.reload()})- this.websocketStatusService.onDocumentDeleted().subscribe(() => {- this.list.reload()- })+ this.websocketStatusService+ .onDocumentDeleted()+ .pipe(takeUntil(this.unsubscribeNotifier))+ .subscribe(() => {+ this.list.reload()+ })this.route.paramMap.pipe(