[FIX] Remove setState from notifications view causing watermelon object to be updated outside an action (#1342)

This commit is contained in:
Diego Mello 2019-10-30 12:44:33 -03:00 committed by GitHub
parent 0a8404d723
commit d03699622a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 6 deletions

View File

@ -141,9 +141,6 @@ export default class NotificationPreferencesView extends React.Component {
}
onValueChangeSwitch = async(key, value) => {
const { room: newRoom } = this.state;
newRoom[key] = value;
this.setState({ room: newRoom });
const params = {
[key]: value ? '1' : '0'
};
@ -155,9 +152,6 @@ export default class NotificationPreferencesView extends React.Component {
}
onValueChangePicker = async(key, value) => {
const { room: newRoom } = this.state;
newRoom[key] = value;
this.setState({ room: newRoom });
const params = {
[key]: value.toString()
};