From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 4 Aug 2023 04:49:11 +0000 (-0700) Subject: Cancel possibly slow queries on leave doc details X-Git-Tag: v1.17.0~1^2~2^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3925%2Fhead;p=thirdparty%2Fpaperless-ngx.git Cancel possibly slow queries on leave doc details --- diff --git a/src-ui/src/app/components/document-detail/document-detail.component.ts b/src-ui/src/app/components/document-detail/document-detail.component.ts index cd402817ae..7a385bebeb 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.ts +++ b/src-ui/src/app/components/document-detail/document-detail.component.ts @@ -213,22 +213,22 @@ export class DocumentDetailComponent this.correspondentService .listAll() - .pipe(first()) + .pipe(first(), takeUntil(this.unsubscribeNotifier)) .subscribe((result) => (this.correspondents = result.results)) this.documentTypeService .listAll() - .pipe(first()) + .pipe(first(), takeUntil(this.unsubscribeNotifier)) .subscribe((result) => (this.documentTypes = result.results)) this.storagePathService .listAll() - .pipe(first()) + .pipe(first(), takeUntil(this.unsubscribeNotifier)) .subscribe((result) => (this.storagePaths = result.results)) this.userService .listAll() - .pipe(first()) + .pipe(first(), takeUntil(this.unsubscribeNotifier)) .subscribe((result) => (this.users = result.results)) this.route.paramMap @@ -406,7 +406,7 @@ export class DocumentDetailComponent ) { this.documentsService .getSuggestions(doc.id) - .pipe(first()) + .pipe(first(), takeUntil(this.unsubscribeNotifier)) .subscribe({ next: (result) => { this.suggestions = result