loleaflet/src/core/Socket.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 7f29a11bf3f78a8133d142d6c3597516ebed52f5 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Sun Nov 20 10:45:48 2016 -0500 loleaflet: don't show disconnection notice when inactive Users aren't bothered with connection errors when inactive. Instead, when they try to re-activate, the connection is re-established, and only if that is not possible does the user see the disconnection notice. Otherwise, the connection is re-established semi-transparently (the is a small "connecting" status shown at the bottom). Change-Id: If4735cc1593c6e29c65d3c9686a8f2861365c583 Reviewed-on: https://gerrit.libreoffice.org/31026 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index 41ddfb4..d88961b 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -435,6 +435,7 @@ L.Socket = L.Class.extend({ }, _onSocketClose: function (e) { + var isActive = this._map._active; this._map.hideBusy(); this._map._active = false; @@ -442,7 +443,9 @@ L.Socket = L.Class.extend({ this._map._docLayer.removeAllViews(); } - this._map.fire('error', {msg: _('Well, this is embarrassing, we cannot connect to your document. Please try again.'), cmd: 'socket', kind: 'closed', id: 4}); + if (isActive) { + this._map.fire('error', {msg: _('Well, this is embarrassing, we cannot connect to your document. Please try again.'), cmd: 'socket', kind: 'closed', id: 4}); + } // Reset wopi's app loaded so that reconnecting again informs outerframe about initialization again this._map['wopi'].resetAppLoaded(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits