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 () {