If no theme setting, default to 'system' theme (#4128)
This commit is contained in:
parent
c2ebbea046
commit
45024beb9c
2 changed files with 2 additions and 2 deletions
|
@ -9,7 +9,7 @@
|
||||||
window.Whisper = window.Whisper || {};
|
window.Whisper = window.Whisper || {};
|
||||||
|
|
||||||
function resolveTheme() {
|
function resolveTheme() {
|
||||||
const theme = storage.get('theme-setting') || 'light';
|
const theme = storage.get('theme-setting') || 'system';
|
||||||
if (window.platform === 'darwin' && theme === 'system') {
|
if (window.platform === 'darwin' && theme === 'system') {
|
||||||
return window.systemTheme;
|
return window.systemTheme;
|
||||||
}
|
}
|
||||||
|
|
|
@ -154,7 +154,7 @@ async function encrypt(data, key, iv) {
|
||||||
const getThemeSetting = makeGetter('theme-setting');
|
const getThemeSetting = makeGetter('theme-setting');
|
||||||
|
|
||||||
async function resolveTheme() {
|
async function resolveTheme() {
|
||||||
const theme = (await getThemeSetting()) || 'light';
|
const theme = (await getThemeSetting()) || 'system';
|
||||||
if (process.platform === 'darwin' && theme === 'system') {
|
if (process.platform === 'darwin' && theme === 'system') {
|
||||||
return nativeTheme.shouldUseDarkColors ? 'dark' : 'light';
|
return nativeTheme.shouldUseDarkColors ? 'dark' : 'light';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue