diff --git a/src/renderer/page/settings/view.jsx b/src/renderer/page/settings/view.jsx index 0b061e87a..639d9195e 100644 --- a/src/renderer/page/settings/view.jsx +++ b/src/renderer/page/settings/view.jsx @@ -14,6 +14,8 @@ class SettingsPage extends React.PureComponent { this.state = { clearingCache: false, }; + + this.onAutomaticDarkModeChange = this.onAutomaticDarkModeChange.bind(this); } clearCache() { @@ -62,11 +64,16 @@ class SettingsPage extends React.PureComponent { onThemeChange(event) { const { value } = event.target; + + if (value === 'dark') { + this.onAutomaticDarkModeChange(false); + } + this.props.setClientSetting(settings.THEME, value); } - onAutomaticDarkModeChange(event) { - this.props.setClientSetting(settings.AUTOMATIC_DARK_MODE_ENABLED, event.target.checked); + onAutomaticDarkModeChange(value) { + this.props.setClientSetting(settings.AUTOMATIC_DARK_MODE_ENABLED, value); } onInstantPurchaseEnabledChange(enabled) { @@ -143,6 +150,7 @@ class SettingsPage extends React.PureComponent { ); } + return (
@@ -325,8 +333,9 @@ class SettingsPage extends React.PureComponent { this.onAutomaticDarkModeChange(e.target.checked)} + checked={automaticDarkModeEnabled} label={__('Automatic dark mode (9pm to 8am)')} />