loleaflet/src/core/Socket.js |   17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

New commits:
commit 1288286d453c0df2b82f0a8b7cc16f5b2d66cb13
Author:     merttumer <mert.tu...@collabora.com>
AuthorDate: Mon May 27 17:11:34 2019 +0300
Commit:     merttumer <mert.tu...@collabora.com>
CommitDate: Mon May 27 17:38:15 2019 +0300

    Send postMessage after renaming the document
    
    Change-Id: Iee0854260fc0fab4de3e2a4fae54716009535b37
    Signed-off-by: merttumer <mert.tu...@collabora.com>

diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 56402e4d5..b48338420 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -742,13 +742,16 @@ L.Socket = L.Class.extend({
                                this._map.options.wopiSrc = 
encodeURIComponent(docUrl);
                                this._map.loadDocument();
                                this._map.sendInitUNOCommands();
-
-                               this._map.fire('postMessage', {
-                                       msgId: 'File_Rename',
-                                       args: {
-                                               NewName: command.filename
-                                       }
-                               });
+                               
+                               if (textMsg.startsWith('renamefile:')) {
+                                       this._map.fire('postMessage', {
+                                               msgId: 'File_Rename',
+                                               args: {
+                                                       NewName: 
command.filename
+                                               }
+                                       });
+                               }
+                               
                        }
                        // var name = command.name; - ignored, we get the new 
name via the wopi's BaseFileName
                }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to