loleaflet/js/toolbar.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
New commits: commit 36e6396f62833b97e8136be83ac29508864c0438 Author: Henry Castro <hcas...@collabora.com> AuthorDate: Fri Jan 4 13:02:26 2019 -0400 Commit: Henry Castro <hcas...@collabora.com> CommitDate: Tue Jan 8 16:23:59 2019 -0400 loleaflet: avoid fire timer event for each toolbar item onRefresh is called for each item, so calling show will queue timer event O(n) Change-Id: Ice9f4d0a515f6bf56471a8eb1d07e40638a7e020 diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js index 7517de31c..acf248928 100644 --- a/loleaflet/js/toolbar.js +++ b/loleaflet/js/toolbar.js @@ -851,11 +851,12 @@ function initMobileToolbar(toolItems) { onClick(e, e.target); hideTooltip(this, e.target); }, - onRefresh: function() { + onRefresh: function(e) { var docType = map.getDocType(); - if (docType === 'presentation') { - this.show('prev'); - this.show('next'); + if (docType === 'presentation' && (e.target === 'prev' || e.target === 'next')) { + if (this.get(e.target).hidden === true) { + this.show(e.target); + } } var showUserList = map['wopi'].HideUserList !== null && _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits