Skip to content

Commit

Permalink
fixes night#3662
Browse files Browse the repository at this point in the history
  • Loading branch information
night authored and whitecrownclown committed Sep 4, 2020
1 parent 67cd5e0 commit 7a17748
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modules/global_css/index.js
Expand Up @@ -4,6 +4,7 @@ const extension = require('../../utils/extension');
const settings = require('../../settings');
const watcher = require('../../watcher');
const twitch = require('../../utils/twitch');
const settingsModule = require('../settings');

const TWITCH_THEME_CHANGED_DISPATCH_TYPE = 'core.ui.THEME_CHANGED';
const TWITCH_THEME_STORAGE_KEY = 'twilight.theme';
Expand Down Expand Up @@ -54,6 +55,7 @@ class GlobalCSSModule {
const isDarkMode = connectStore.getState().ui.theme === TwitchThemes.DARK;
if (settings.get('darkenedMode') !== isDarkMode) {
settings.set('darkenedMode', isDarkMode, false, true);
settingsModule.updateSettingToggle('darkenedMode', isDarkMode);
}
});
}
Expand Down
5 changes: 5 additions & 0 deletions src/modules/settings/index.js
Expand Up @@ -223,6 +223,11 @@ class SettingsModule {
$('#bttvSettingsPanel').show('slow');
}

updateSettingToggle(settingId, value) {
$(`#${settingId}True`).prop('checked', value === true);
$(`#${settingId}False`).prop('checked', value === false);
}

backup() {
let rv = storage.getStorage();

Expand Down

0 comments on commit 7a17748

Please sign in to comment.