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

Jan Holesovsky kendy at collabora.com
Tue Nov 7 16:23:36 UTC 2017


 loleaflet/src/core/Socket.js |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 01064f83c8d408017d4e800b77c6f4adcf71dd7d
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Tue Nov 7 13:38:22 2017 +0100

    Each error should hide the busy indicator in the statusbar.
    
    Change-Id: I4676b2b6fe44351102feedf4728ff0911c15417b
    Reviewed-on: https://gerrit.libreoffice.org/44404
    Reviewed-by: pranavk <pranavk at collabora.co.uk>
    Tested-by: pranavk <pranavk at collabora.co.uk>

diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index cc7e8d6c..2a70bde7 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -387,6 +387,7 @@ L.Socket = L.Class.extend({
 			return;
 		}
 		else if (textMsg.startsWith('error:') && command.errorCmd === 'storage') {
+			this._map.hideBusy();
 			var storageError;
 			if (command.errorKind === 'savediskfull') {
 				storageError = errorMessages.storage.savediskfull;
@@ -402,7 +403,6 @@ L.Socket = L.Class.extend({
 				// Since this is a document load failure, wsd will disconnect the socket anyway,
 				// better we do it first so that another error message doesn't override this one
 				// upon socket close.
-				this._map.hideBusy();
 				this.close();
 			}
 			else if (command.errorKind === 'documentconflict')
@@ -448,12 +448,12 @@ L.Socket = L.Class.extend({
 			return;
 		}
 		else if (textMsg.startsWith('error:') && command.errorCmd === 'internal') {
+			this._map.hideBusy();
 			this._map._fatal = true;
 			if (command.errorKind === 'diskfull') {
 				this._map.fire('error', {msg: errorMessages.diskfull});
 			}
 			else if (command.errorKind === 'unauthorized') {
-				this._map.hideBusy();
 				this._map.fire('error', {msg: errorMessages.unauthorized});
 			}
 
@@ -468,6 +468,7 @@ L.Socket = L.Class.extend({
 			this._map.hideBusy();
 		}
 		else if (textMsg.startsWith('error:') && command.errorCmd === 'load') {
+			this._map.hideBusy();
 			this.close();
 
 			var errorKind = command.errorKind;


More information about the Libreoffice-commits mailing list