[Libreoffice-commits] online.git: loleaflet/src
Jan Holesovsky (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jul 16 09:53:52 UTC 2020
loleaflet/src/map/Map.js | 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit 8d4f800b69de4239a397558d032863bdd86bcf44
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Wed Jul 15 23:24:55 2020 +0200
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Thu Jul 16 11:53:33 2020 +0200
android: Hide sidebar on Chromebooks early.
This is a hack - but I fear the best we can do just now. The problem is
that the sidebar is always initialized at the startup, just for mobile
phones and tablets, we don't show it thanks to an early exit in
_launchSidebar() when the app starts in read-only mode (which it does
for phones and tablets).
Now when we have switched the Chromebook UI to the desktop one, we need
to explicitly turn the sidebar off on start, because otherwise it
occupies too much screen.
Of course - much better would be not to initialize the sidebar at all
when it is not necessary - but there's no easy way to do that :-(
Change-Id: I0340d125181285dcebda4ff78971182a7072dddb
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98866
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 8d1f0302a..5072ce692 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -289,6 +289,16 @@ L.Map = L.Evented.extend({
if (window.mode.isDesktop() && !window.ThisIsAMobileApp) {
map._socket.sendMessage('uno .uno:SidebarShow');
}
+ else if (window.mode.isChromebook()) {
+ // HACK - currently the sidebar shows when loaded,
+ // with the exception of mobile phones & tablets - but
+ // there, it does not show only because they start
+ // with read/only mode which hits an early exit in
+ // _launchSidebar() in Control.LokDialog.js
+ // So for the moment, let's just hide it on
+ // Chromebooks early
+ map._socket.sendMessage('uno .uno:SidebarHide');
+ }
}, 200);
}
More information about the Libreoffice-commits
mailing list