[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-5' - loleaflet/src
Jan Holesovsky (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jul 15 21:41:56 UTC 2020
loleaflet/src/map/Map.js | 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit 28816052af02e1fa61d06806bf366be33d4b4b6a
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Wed Jul 15 23:24:55 2020 +0200
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Wed Jul 15 23:41:37 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/+/98862
Tested-by: Jan Holesovsky <kendy at collabora.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 5f9882a53..0368915e3 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -304,6 +304,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