diff --git a/src/view/FilesAppIntegration.js b/src/view/FilesAppIntegration.js index 70067b534e..5ed879be0d 100644 --- a/src/view/FilesAppIntegration.js +++ b/src/view/FilesAppIntegration.js @@ -86,8 +86,6 @@ export default { return } - this.updateFileInfo(undefined, Date.now()) - this.fileModel = null $('#richdocuments-header').remove() }, diff --git a/src/view/Office.vue b/src/view/Office.vue index ae4521be9f..4dccf57e28 100644 --- a/src/view/Office.vue +++ b/src/view/Office.vue @@ -157,6 +157,7 @@ export default { showLinkPicker: false, showZotero: false, + modified: false, formData: { action: null, @@ -281,6 +282,9 @@ export default { }, close() { FilesAppIntegration.close() + if (this.modified) { + FilesAppIntegration.updateFileInfo(undefined, Date.now()) + } disableScrollLock() this.$parent.close() }, @@ -371,9 +375,20 @@ export default { case 'Action_GetLinkPreview': this.resolveLink(args.url) break + case 'Action_Save': + if (this.modified) { + FilesAppIntegration.updateFileInfo(undefined, Date.now()) + } + break case 'Clicked_Button': this.buttonClicked(args) break + case 'Doc_ModifiedStatus': + if (args.Modified !== this.modified) { + FilesAppIntegration.updateFileInfo(undefined, Date.now()) + } + this.modified = args.Modified + break } },