From afb29bfdefa4c811a50112f5a3758e663b5122b4 Mon Sep 17 00:00:00 2001 From: Christopher Willis-Ford <7019101+cwillisf@users.noreply.github.com> Date: Wed, 18 Nov 2020 15:34:01 -0800 Subject: [PATCH] use openTelemetryModal instead of showTelemetryModal --- src/renderer/app.jsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/renderer/app.jsx b/src/renderer/app.jsx index 9fa906e..aaff2ae 100644 --- a/src/renderer/app.jsx +++ b/src/renderer/app.jsx @@ -20,7 +20,8 @@ import { } from 'scratch-gui/src/reducers/project-state'; import { openLoadingProject, - closeLoadingProject + closeLoadingProject, + openTelemetryModal } from 'scratch-gui/src/reducers/modals'; import ElectronStorageHelper from '../common/ElectronStorageHelper'; @@ -127,10 +128,7 @@ const ScratchDesktopHOC = function (WrappedComponent) { }, { title: 'Telemetry Settings', - onClick: () => { - // set to null (non-Boolean) to cause app to ask again - ipcRenderer.sendSync('clearTelemetryDidOptIn'); - } + onClick: () => this.props.onTelemetrySettingsClicked() } ]} onProjectTelemetryEvent={this.handleProjectTelemetryEvent} @@ -154,6 +152,7 @@ const ScratchDesktopHOC = function (WrappedComponent) { onLoadingCompleted: PropTypes.func, onLoadingStarted: PropTypes.func, onRequestNewProject: PropTypes.func, + onTelemetrySettingsClicked: PropTypes.func, vm: PropTypes.instanceOf(VM).isRequired }; const mapStateToProps = state => { @@ -182,7 +181,8 @@ const ScratchDesktopHOC = function (WrappedComponent) { const canSaveToServer = false; return dispatch(onLoadedProject(loadingState, canSaveToServer, loadSuccess)); }, - onRequestNewProject: () => dispatch(requestNewProject(false)) + onRequestNewProject: () => dispatch(requestNewProject(false)), + onTelemetrySettingsClicked: () => dispatch(openTelemetryModal()) }); return connect(mapStateToProps, mapDispatchToProps)(ScratchDesktopComponent);