[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon May 27 14:38:38 UTC 2019


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

New commits:
commit 1288286d453c0df2b82f0a8b7cc16f5b2d66cb13
Author:     merttumer <mert.tumer at collabora.com>
AuthorDate: Mon May 27 17:11:34 2019 +0300
Commit:     merttumer <mert.tumer at 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.tumer at 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
 		}


More information about the Libreoffice-commits mailing list