From b8374494eab79c0427b9f82a6a27cb6c81f79f36 Mon Sep 17 00:00:00 2001 From: asmsuechan Date: Mon, 31 Jul 2017 23:02:49 +0900 Subject: [PATCH] Change order for AMA event --- browser/main/modals/PreferencesModal/InfoTab.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/browser/main/modals/PreferencesModal/InfoTab.js b/browser/main/modals/PreferencesModal/InfoTab.js index 8ad97240..496fcd71 100644 --- a/browser/main/modals/PreferencesModal/InfoTab.js +++ b/browser/main/modals/PreferencesModal/InfoTab.js @@ -34,15 +34,16 @@ class InfoTab extends React.Component { amaEnabled: this.state.config.amaEnabled } + if (!newConfig.amaEnabled) { + AwsMobileAnalyticsConfig.recordDynamicCustomEvent('DISABLE_AMA') + } + ConfigManager.set(newConfig) store.dispatch({ type: 'SET_CONFIG', config: newConfig }) - if (!newConfig.amaEnabled) { - AwsMobileAnalyticsConfig.recordDynamicCustomEvent('DISABLE_AMA') - } } render () {