mirror of
https://github.com/scratchfoundation/scratch-desktop.git
synced 2024-12-22 21:52:31 -05:00
use openTelemetryModal instead of showTelemetryModal
This commit is contained in:
parent
25072c0046
commit
afb29bfdef
1 changed files with 6 additions and 6 deletions
|
@ -20,7 +20,8 @@ import {
|
||||||
} from 'scratch-gui/src/reducers/project-state';
|
} from 'scratch-gui/src/reducers/project-state';
|
||||||
import {
|
import {
|
||||||
openLoadingProject,
|
openLoadingProject,
|
||||||
closeLoadingProject
|
closeLoadingProject,
|
||||||
|
openTelemetryModal
|
||||||
} from 'scratch-gui/src/reducers/modals';
|
} from 'scratch-gui/src/reducers/modals';
|
||||||
|
|
||||||
import ElectronStorageHelper from '../common/ElectronStorageHelper';
|
import ElectronStorageHelper from '../common/ElectronStorageHelper';
|
||||||
|
@ -127,10 +128,7 @@ const ScratchDesktopHOC = function (WrappedComponent) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Telemetry Settings',
|
title: 'Telemetry Settings',
|
||||||
onClick: () => {
|
onClick: () => this.props.onTelemetrySettingsClicked()
|
||||||
// set to null (non-Boolean) to cause app to ask again
|
|
||||||
ipcRenderer.sendSync('clearTelemetryDidOptIn');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
onProjectTelemetryEvent={this.handleProjectTelemetryEvent}
|
onProjectTelemetryEvent={this.handleProjectTelemetryEvent}
|
||||||
|
@ -154,6 +152,7 @@ const ScratchDesktopHOC = function (WrappedComponent) {
|
||||||
onLoadingCompleted: PropTypes.func,
|
onLoadingCompleted: PropTypes.func,
|
||||||
onLoadingStarted: PropTypes.func,
|
onLoadingStarted: PropTypes.func,
|
||||||
onRequestNewProject: PropTypes.func,
|
onRequestNewProject: PropTypes.func,
|
||||||
|
onTelemetrySettingsClicked: PropTypes.func,
|
||||||
vm: PropTypes.instanceOf(VM).isRequired
|
vm: PropTypes.instanceOf(VM).isRequired
|
||||||
};
|
};
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = state => {
|
||||||
|
@ -182,7 +181,8 @@ const ScratchDesktopHOC = function (WrappedComponent) {
|
||||||
const canSaveToServer = false;
|
const canSaveToServer = false;
|
||||||
return dispatch(onLoadedProject(loadingState, canSaveToServer, loadSuccess));
|
return dispatch(onLoadedProject(loadingState, canSaveToServer, loadSuccess));
|
||||||
},
|
},
|
||||||
onRequestNewProject: () => dispatch(requestNewProject(false))
|
onRequestNewProject: () => dispatch(requestNewProject(false)),
|
||||||
|
onTelemetrySettingsClicked: () => dispatch(openTelemetryModal())
|
||||||
});
|
});
|
||||||
|
|
||||||
return connect(mapStateToProps, mapDispatchToProps)(ScratchDesktopComponent);
|
return connect(mapStateToProps, mapDispatchToProps)(ScratchDesktopComponent);
|
||||||
|
|
Loading…
Reference in a new issue