From d03699622a2752d24875b6277c525cc7ec34a1f3 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Wed, 30 Oct 2019 12:44:33 -0300 Subject: [PATCH] [FIX] Remove setState from notifications view causing watermelon object to be updated outside an action (#1342) --- app/views/NotificationPreferencesView/index.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/views/NotificationPreferencesView/index.js b/app/views/NotificationPreferencesView/index.js index 423d2a7fb..96fc04983 100644 --- a/app/views/NotificationPreferencesView/index.js +++ b/app/views/NotificationPreferencesView/index.js @@ -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() };