[FIX] Remove setState from notifications view causing watermelon object to be updated outside an action (#1342)
This commit is contained in:
parent
0a8404d723
commit
d03699622a
|
@ -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()
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue