If no theme setting, default to 'system' theme (#4128)

This commit is contained in:
Corey Rice 2020-04-15 21:17:58 -03:00 committed by GitHub
parent c2ebbea046
commit 45024beb9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -9,7 +9,7 @@
window.Whisper = window.Whisper || {};
function resolveTheme() {
const theme = storage.get('theme-setting') || 'light';
const theme = storage.get('theme-setting') || 'system';
if (window.platform === 'darwin' && theme === 'system') {
return window.systemTheme;
}

View file

@ -154,7 +154,7 @@ async function encrypt(data, key, iv) {
const getThemeSetting = makeGetter('theme-setting');
async function resolveTheme() {
const theme = (await getThemeSetting()) || 'light';
const theme = (await getThemeSetting()) || 'system';
if (process.platform === 'darwin' && theme === 'system') {
return nativeTheme.shouldUseDarkColors ? 'dark' : 'light';
}