From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 18 Feb 2022 07:05:14 +0000 (-0800) Subject: clear 'dirty' documents when closing all X-Git-Tag: ngx-1.6.0-rc1~77^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13%2Fhead;p=thirdparty%2Fpaperless-ngx.git clear 'dirty' documents when closing all --- diff --git a/src-ui/src/app/services/open-documents.service.ts b/src-ui/src/app/services/open-documents.service.ts index c44f4cd750..92802c7651 100644 --- a/src-ui/src/app/services/open-documents.service.ts +++ b/src-ui/src/app/services/open-documents.service.ts @@ -102,6 +102,7 @@ export class OpenDocumentsService { modal.componentInstance.buttonsEnabled = false modal.close() this.openDocuments.splice(0, this.openDocuments.length) + this.dirtyDocuments.clear() this.save() }) const subject = new Subject() @@ -109,6 +110,7 @@ export class OpenDocumentsService { return subject.asObservable() } else { this.openDocuments.splice(0, this.openDocuments.length) + this.dirtyDocuments.clear() this.save() return of(true) }