[Libreoffice-commits] online.git: loleaflet/src

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 10 16:52:27 UTC 2020


 loleaflet/src/control/Control.MobileWizard.js |   12 ++++++++++++
 1 file changed, 12 insertions(+)

New commits:
commit 35710df7df2780b49b31b74b1884b823bd00de2f
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Wed Jun 10 18:20:03 2020 +0200
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Wed Jun 10 18:52:09 2020 +0200

    Restore sidebar content deduplication.
    
    It's still useful to avoid flickering.
    
    This reverts commit b761ab848dcad6f38c38c28ff6619743b0502a9f.
    
    Change-Id: If7986ddcc53c4086e05e888ad93c4831bc781796
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96061
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>

diff --git a/loleaflet/src/control/Control.MobileWizard.js b/loleaflet/src/control/Control.MobileWizard.js
index 6e819d359..406ba8716 100644
--- a/loleaflet/src/control/Control.MobileWizard.js
+++ b/loleaflet/src/control/Control.MobileWizard.js
@@ -17,6 +17,7 @@ L.Control.MobileWizard = L.Control.extend({
 	_currentPath: [],
 	_tabs: [],
 	_currentScrollPosition: 0,
+	_lastSidebarData: '',
 
 	initialize: function (options) {
 		L.setOptions(this, options);
@@ -329,6 +330,17 @@ L.Control.MobileWizard = L.Control.extend({
 				window.mobileDialogId = data.id;
 			}
 
+			// Sometimes it happens that we get the same sidebar
+			// structure twice. This makes hard to test mobile wizard.
+			if (isSidebar && L.Browser.cypressTest) {
+				var dataString = JSON.stringify(data.children);
+				if (this._isActive && this.map.showSidebar &&
+					dataString === this._lastSidebarData) {
+					return;
+				}
+				this._lastSidebarData = dataString;
+			}
+
 			if (this.map.getDocType() === 'presentation')
 				$('#mobile-wizard-header').show();
 


More information about the Libreoffice-commits mailing list