From 70da78af69e2f411cec41a86cd16b03a004831c1 Mon Sep 17 00:00:00 2001 From: Saturnino Abril Date: Mon, 20 Mar 2017 22:51:48 +0900 Subject: [PATCH] fixed android app crash on saving notification (#364) --- app/scenes/account_notifications/account_notifications.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/scenes/account_notifications/account_notifications.js b/app/scenes/account_notifications/account_notifications.js index d970304c6..7718b7feb 100644 --- a/app/scenes/account_notifications/account_notifications.js +++ b/app/scenes/account_notifications/account_notifications.js @@ -48,7 +48,7 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { const SAVE_NOTIFY_PROPS = 'save_notify_props'; const SAVING_NOTIFY_PROPS = 'saving_notify_props'; -export default class AccountNofications extends PureComponent { +export default class AccountNotifications extends PureComponent { static propTypes = { actions: PropTypes.shape({ goBack: PropTypes.func.isRequired, @@ -95,7 +95,7 @@ export default class AccountNofications extends PureComponent { this.props.actions.goBack(); } else if (nextProps.saveRequestStatus === RequestStatus.FAILURE && this.props.saveRequestStatus === RequestStatus.STARTED) { EventEmitter.emit(SAVING_NOTIFY_PROPS, false); - this.setStateFromNotifyProps(this.currentUser.notify_props); + this.setStateFromNotifyProps(nextProps.currentUser.notify_props); } }