]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
clear 'dirty' documents when closing all 13/head
authorMichael Shamoon <4887959+shamoon@users.noreply.github.com>
Fri, 18 Feb 2022 07:05:14 +0000 (23:05 -0800)
committerMichael Shamoon <4887959+shamoon@users.noreply.github.com>
Fri, 18 Feb 2022 07:05:14 +0000 (23:05 -0800)
src-ui/src/app/services/open-documents.service.ts

index c44f4cd7504e618ca32a1d68f5fcf13a2aebf950..92802c765132d063ef84f1362fcfceabb760aad0 100644 (file)
@@ -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<boolean>()
@@ -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)
     }