Fix automatic dark mode.

- Users are able to select the automatic dark mode checkbox
	- If it is not selected it should not allow users to pick another theme.
This commit is contained in:
Dan1d 2019-07-23 23:10:56 -03:00
parent c126fa67fc
commit f21c28fbfc

View file

@ -153,7 +153,6 @@ class SettingsPage extends React.PureComponent<Props, State> {
} = this.props;
const noDaemonSettings = !daemonSettings || Object.keys(daemonSettings).length === 0;
const isDarkModeEnabled = currentTheme === 'dark';
const defaultMaxKeyFee = { currency: 'USD', amount: 50 };
const disableMaxKeyFee = !(daemonSettings && daemonSettings.max_key_fee);
@ -350,7 +349,6 @@ class SettingsPage extends React.PureComponent<Props, State> {
name="automatic_dark_mode"
onChange={() => this.onAutomaticDarkModeChange(!automaticDarkModeEnabled)}
checked={automaticDarkModeEnabled}
disabled={isDarkModeEnabled}
label={__('Automatic dark mode (9pm to 8am)')}
/>
</fieldset-section>