Update settings.js
Added fallback to application theme setting if it can't read system theme settingmaster
parent
e81259e2c4
commit
4cac535960
|
|
@ -67,6 +67,9 @@
|
||||||
// Read the current system theme
|
// Read the current system theme
|
||||||
function getCurrentTheme() {
|
function getCurrentTheme() {
|
||||||
let s = require('Storage').readJSON("setting.json", 1) || {};
|
let s = require('Storage').readJSON("setting.json", 1) || {};
|
||||||
|
if (!s.theme) {
|
||||||
|
return appSettings.theme; // fallback to appSettings.theme (light or dark)
|
||||||
|
}
|
||||||
return s.theme.dark ? 'dark' : 'light';
|
return s.theme.dark ? 'dark' : 'light';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue