diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2021-04-02 13:51:12 +0300 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2021-04-02 13:52:02 +0300 |
commit | d60936e628dd8063759d3c1612dfcc3e40dd8be3 (patch) | |
tree | 55eb49c093edc65a77d63aca27c17979d139a8c8 /src | |
parent | 65685cd8dd1f542f7a9e2cb83a8e7956c7b8de97 (diff) |
Reload file name for share feature after Save As
There was a bug that after save as the sidebar was showing
the old file when we used share feature.
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/files.js | 2 | ||||
-rw-r--r-- | src/view/FilesAppIntegration.js | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/files.js b/src/files.js index 54123615..a51b9954 100644 --- a/src/files.js +++ b/src/files.js @@ -342,7 +342,7 @@ $(document).ready(function() { FilesAppIntegration.rename(args.NewName) break case 'Action_Save_Resp': - FilesAppIntegration.saveAs() + FilesAppIntegration.saveAs(args.fileName) break case 'close': odfViewer.onClose() diff --git a/src/view/FilesAppIntegration.js b/src/view/FilesAppIntegration.js index 01e41ba9..4893508d 100644 --- a/src/view/FilesAppIntegration.js +++ b/src/view/FilesAppIntegration.js @@ -109,14 +109,19 @@ export default { $('#richdocuments-header').remove() }, - saveAs() { + saveAs(newName) { if (this.handlers.saveAs && this.handlers.saveAs(this)) { return } + if (newName) { + this.fileName = newName + } + if (this.getFileList()) { this.getFileList() .reload() + OC.Apps.hideAppSidebar() } }, |