mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-09 09:58:20 -05:00
Fix: intermittent save & close warnings in v2.5.3 (#5838)
This commit is contained in:
parent
76064178f5
commit
4948438378
@ -634,11 +634,14 @@ export class DocumentDetailComponent
|
|||||||
// in case data changed while saving eg removing inbox_tags
|
// in case data changed while saving eg removing inbox_tags
|
||||||
this.documentForm.patchValue(docValues)
|
this.documentForm.patchValue(docValues)
|
||||||
this.store.next(this.documentForm.value)
|
this.store.next(this.documentForm.value)
|
||||||
|
this.openDocumentService.setDirty(this.document, false)
|
||||||
this.toastService.showInfo($localize`Document saved successfully.`)
|
this.toastService.showInfo($localize`Document saved successfully.`)
|
||||||
close && this.close()
|
|
||||||
this.networkActive = false
|
this.networkActive = false
|
||||||
this.error = null
|
this.error = null
|
||||||
this.openDocumentService.refreshDocument(this.documentId)
|
close &&
|
||||||
|
this.close(() =>
|
||||||
|
this.openDocumentService.refreshDocument(this.documentId)
|
||||||
|
)
|
||||||
},
|
},
|
||||||
error: (error) => {
|
error: (error) => {
|
||||||
this.networkActive = false
|
this.networkActive = false
|
||||||
@ -693,12 +696,13 @@ export class DocumentDetailComponent
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
close() {
|
close(closedCallback: () => void = null) {
|
||||||
this.openDocumentService
|
this.openDocumentService
|
||||||
.closeDocument(this.document)
|
.closeDocument(this.document)
|
||||||
.pipe(first())
|
.pipe(first())
|
||||||
.subscribe((closed) => {
|
.subscribe((closed) => {
|
||||||
if (!closed) return
|
if (!closed) return
|
||||||
|
if (closedCallback) closedCallback()
|
||||||
if (this.documentListViewService.activeSavedViewId) {
|
if (this.documentListViewService.activeSavedViewId) {
|
||||||
this.router.navigate([
|
this.router.navigate([
|
||||||
'view',
|
'view',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user