move getThemes -> settings -> componentWillMount
This commit is contained in:
parent
8b8c9c9da9
commit
c257691b57
2 changed files with 10 additions and 0 deletions
|
@ -4,6 +4,7 @@ import { doClearCache } from "actions/app";
|
|||
import {
|
||||
doSetDaemonSetting,
|
||||
doSetClientSetting,
|
||||
doGetThemes,
|
||||
doSetTheme,
|
||||
} from "actions/settings";
|
||||
import { selectDaemonSettings, selectShowNsfw } from "selectors/settings";
|
||||
|
@ -19,6 +20,7 @@ const perform = dispatch => ({
|
|||
clearCache: () => dispatch(doClearCache()),
|
||||
setClientSetting: (key, value) => dispatch(doSetClientSetting(key, value)),
|
||||
setTheme: name => dispatch(doSetTheme(name)),
|
||||
getThemes: () => dispatch(doGetThemes),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(SettingsPage);
|
||||
|
|
|
@ -51,6 +51,10 @@ class SettingsPage extends React.PureComponent {
|
|||
this.props.setTheme(value);
|
||||
}
|
||||
|
||||
getThemes() {
|
||||
this.props.getThemes();
|
||||
}
|
||||
|
||||
onRunOnStartChange(event) {
|
||||
this.setDaemonSetting("run_on_startup", event.target.checked);
|
||||
}
|
||||
|
@ -114,6 +118,10 @@ class SettingsPage extends React.PureComponent {
|
|||
|
||||
onShowUnavailableChange(event) {}
|
||||
|
||||
componentWillMount() {
|
||||
this.getThemes();
|
||||
}
|
||||
|
||||
componentDidMount() {}
|
||||
|
||||
render() {
|
||||
|
|
Loading…
Reference in a new issue