summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2020-07-15 23:24:55 +0200
committerJan Holesovsky <kendy@collabora.com>2020-07-15 23:41:37 +0200
commit28816052af02e1fa61d06806bf366be33d4b4b6a (patch)
tree2da416c45c5567eeb4d7e3c560f21f4ea3a92897
parentandroid: Actually use the Desktop browser UI for Chromebooks. (diff)
downloadonline-28816052af02e1fa61d06806bf366be33d4b4b6a.tar.gz
online-28816052af02e1fa61d06806bf366be33d4b4b6a.zip
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@collabora.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r--loleaflet/src/map/Map.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 5f9882a53d..0368915e3e 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);
}