diff --git a/app/containers/App/index.jsx b/app/containers/App/index.jsx index 549f3302..ac97a497 100644 --- a/app/containers/App/index.jsx +++ b/app/containers/App/index.jsx @@ -129,6 +129,21 @@ class App extends Component { const { actionCreateCopyJsonFileToSettings } = this.props; const settingsFromStorage = settingsStorage.getAll(); + // Migration: Change analytics to opt-in for all users (Issue #248) + // Previously analytics was opt-out by default, which is a privacy concern. + // This migration ensures all users (new and existing) have analytics disabled by default. + if (typeof settingsFromStorage.enableAnalytics === 'undefined') { + // New installation - use the new default (false) from initialState + settingsFromStorage.enableAnalytics = false; + } else if (settingsFromStorage.enableAnalytics === true) { + // Existing installation with analytics enabled - disable it for privacy + // Users can re-enable if they choose to opt-in + settingsFromStorage.enableAnalytics = false; + + // Persist this change immediately + settingsStorage.setAll({ ...settingsFromStorage }); + } + actionCreateCopyJsonFileToSettings({ ...settingsFromStorage }); } catch (e) { log.error(e, `App -> writeJsonToSettings`); diff --git a/app/containers/Settings/reducers.js b/app/containers/Settings/reducers.js index bd2856a1..0c941f77 100644 --- a/app/containers/Settings/reducers.js +++ b/app/containers/Settings/reducers.js @@ -19,7 +19,7 @@ export const initialState = { enableBackgroundAutoUpdate: true, // if the freshly installed version is a prerelease version then save [enablePrereleaseUpdates] as true enablePrereleaseUpdates: isPrereleaseVersion() || false, - enableAnalytics: true, + enableAnalytics: false, enableStatusBar: true, enableUsbHotplug: false, hideHiddenFiles: {