fix options checkbox

This commit is contained in:
SpikeHD
2022-05-20 19:53:38 -07:00
parent 2983345d1b
commit fcf395eccb
3 changed files with 9 additions and 4 deletions

View File

@@ -35,6 +35,8 @@ export default class Options extends React.Component<IProps, IState> {
current_language: 'en',
bg_url_or_path: ''
}
this.toggleGrasscutterWithGame = this.toggleGrasscutterWithGame.bind(this)
}
async componentDidMount() {
@@ -71,7 +73,12 @@ export default class Options extends React.Component<IProps, IState> {
}
async toggleGrasscutterWithGame() {
setConfigOption('grasscutter_with_game', !(await getConfigOption('grasscutter_with_game')))
const changedVal = !(await getConfigOption('grasscutter_with_game'))
setConfigOption('grasscutter_with_game', changedVal)
this.setState({
grasscutter_with_game: changedVal
})
}
setCustomBackground() {