android: enable webview localstorage
- priortize theme settings from SettingsActivity over savedState - fix darkmode toggle button does not behave as expected Signed-off-by: Rash419 <rashesh.padia@collabora.com> Change-Id: Idb884cba3af335edc0936736f35610e91cfd64e6pull/7112/head
parent
1626281940
commit
ccb20f1ed3
|
@ -352,6 +352,8 @@ public class LOActivity extends AppCompatActivity {
|
|||
webSettings.setJavaScriptEnabled(true);
|
||||
mWebView.addJavascriptInterface(this, "COOLMessageHandler");
|
||||
|
||||
webSettings.setDomStorageEnabled(true);
|
||||
|
||||
// allow debugging (when building the debug version); see details in
|
||||
// https://developers.google.com/web/tools/chrome-devtools/remote-debugging/webviews
|
||||
boolean isChromeDebugEnabled = sPrefs.getBoolean("ENABLE_CHROME_DEBUGGING", false);
|
||||
|
|
|
@ -124,6 +124,12 @@ L.Control.UIManager = L.Control.extend({
|
|||
|
||||
initDarkModeFromSettings: function() {
|
||||
var selectedMode = this.getDarkModeState();
|
||||
|
||||
if (window.ThisIsTheAndroidApp) {
|
||||
selectedMode = window.uiDefaults['darkTheme'] ? window.uiDefaults['darkTheme'] : false;
|
||||
this.setSavedState('darkTheme', selectedMode);
|
||||
}
|
||||
|
||||
if (selectedMode) {
|
||||
this.loadDarkMode();
|
||||
var cmd = {
|
||||
|
@ -143,7 +149,7 @@ L.Control.UIManager = L.Control.extend({
|
|||
renameDocument: function() {
|
||||
// todo: does this need _('rename document)
|
||||
var docNameInput = this.documentNameInput;
|
||||
this.showInputModal('rename-modal', _('Rename Document'), _('Enter new name'), '', _('Rename'),
|
||||
this.showInputModal('rename-modal', _('Rename Document'), _('Enter new name'), '', _('Rename'),
|
||||
function(newName) {
|
||||
docNameInput.documentNameConfirm(newName);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue