initial dark mode not always set
typically can be seen on a fast connection to a NextCloud instance Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com> Change-Id: Ie3431d58cb2499464e1bfac95dcf3b981536a7a2
This commit is contained in:
parent
0c7cb448ca
commit
d42798abc6
1 changed files with 15 additions and 0 deletions
|
@ -243,6 +243,21 @@ app.definitions.Socket = L.Class.extend({
|
|||
if (spellOnline) {
|
||||
msg += ' spellOnline=' + spellOnline;
|
||||
}
|
||||
var docTypes = ['text', 'spreadsheet', 'presentation', 'drawing'];
|
||||
for (var i = 0; i < docTypes.length; ++i) {
|
||||
var docType = docTypes[i];
|
||||
var darkTheme = false;
|
||||
if (window.uiDefaults) {
|
||||
darkTheme = window.uiDefaults.darkTheme === true;
|
||||
}
|
||||
var item = window.localStorage.getItem('UIDefaults_' + docType + '_darkTheme');
|
||||
if (item) {
|
||||
darkTheme = item;
|
||||
}
|
||||
if (darkTheme) {
|
||||
msg += ' ' + docType + 'DarkTheme=' + darkTheme;
|
||||
}
|
||||
}
|
||||
|
||||
var accessibilityState = window.localStorage.getItem('accessibilityState') === 'true';
|
||||
accessibilityState = accessibilityState || L.Browser.cypressTest;
|
||||
|
|
Loading…
Reference in a new issue