From 572dee67855992175f90f27f94e5d61a5a3f9c9c Mon Sep 17 00:00:00 2001 From: Evelyn Eastmond <evhan55@gmail.com> Date: Fri, 14 Sep 2018 15:06:52 -0400 Subject: [PATCH] Removing alerts dispatching from blocks tab. --- src/containers/blocks.jsx | 5 ----- src/lib/vm-listener-hoc.jsx | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/containers/blocks.jsx b/src/containers/blocks.jsx index 8e882de13..499d77636 100644 --- a/src/containers/blocks.jsx +++ b/src/containers/blocks.jsx @@ -22,7 +22,6 @@ import {updateToolbox} from '../reducers/toolbox'; import {activateColorPicker} from '../reducers/color-picker'; import {closeExtensionLibrary} from '../reducers/modals'; import {activateCustomProcedures, deactivateCustomProcedures} from '../reducers/custom-procedures'; -import {viewAlert} from '../reducers/alerts'; const addFunctionListener = (object, property, callback) => { const oldFn = object[property]; @@ -379,7 +378,6 @@ class Blocks extends React.Component { this.setState({connectionModal: null}); } handleStatusButtonUpdate () { - this.props.onViewAlert(); this.ScratchBlocks.refreshStatusButtons(this.workspace); } handlePromptCallback (input, optionSelection) { @@ -414,7 +412,6 @@ class Blocks extends React.Component { onActivateCustomProcedures, onRequestCloseExtensionLibrary, onRequestCloseCustomProcedures, - onViewAlert, toolboxXML, ...props } = this.props; @@ -476,7 +473,6 @@ Blocks.propTypes = { onActivateCustomProcedures: PropTypes.func, onRequestCloseCustomProcedures: PropTypes.func, onRequestCloseExtensionLibrary: PropTypes.func, - onViewAlert: PropTypes.func, options: PropTypes.shape({ media: PropTypes.string, zoom: PropTypes.shape({ @@ -560,7 +556,6 @@ const mapDispatchToProps = dispatch => ({ onRequestCloseCustomProcedures: data => { dispatch(deactivateCustomProcedures(data)); }, - onViewAlert: () => dispatch(viewAlert()), updateToolboxState: toolboxXML => { dispatch(updateToolbox(toolboxXML)); } diff --git a/src/lib/vm-listener-hoc.jsx b/src/lib/vm-listener-hoc.jsx index 67e70f900..152caff80 100644 --- a/src/lib/vm-listener-hoc.jsx +++ b/src/lib/vm-listener-hoc.jsx @@ -9,6 +9,7 @@ import {updateTargets} from '../reducers/targets'; import {updateBlockDrag} from '../reducers/block-drag'; import {updateMonitors} from '../reducers/monitors'; import {setRunningState, setTurboState} from '../reducers/vm-status'; +import {viewAlert} from '../reducers/alerts'; /* * Higher Order Component to manage events emitted by the VM -- GitLab