diff --git a/lib/state/simperium/middleware.ts b/lib/state/simperium/middleware.ts index e7b461444..270acb605 100644 --- a/lib/state/simperium/middleware.ts +++ b/lib/state/simperium/middleware.ts @@ -155,9 +155,15 @@ export const initSimperium = ( return; } - dispatch({ - type: 'SET_ANALYTICS', - allowAnalytics: !!updatedEntity.analytics_enabled, + preferencesBucket.get('preferences-key').then((preferences) => { + if ( + updatedEntity.analytics_enabled !== preferences.data.analytics_enabled + ) { + dispatch({ + type: 'SET_ANALYTICS', + allowAnalytics: !!updatedEntity.analytics_enabled, + }); + } }); });