diff --git a/react/features/security/actions.js b/react/features/security/actions.js index 0efccde32..005b00c96 100644 --- a/react/features/security/actions.js +++ b/react/features/security/actions.js @@ -1,16 +1,16 @@ // @flow -import { openDialog } from '../base/dialog'; +import { toggleDialog } from '../base/dialog'; import { SecurityDialog } from './components/security-dialog'; /** - * Action that triggers opening the security options dialog. + * Action that triggers toggle of the security options dialog. * * @returns {Function} */ -export function openSecurityDialog() { +export function toggleSecurityDialog() { return function(dispatch: (Object) => Object) { - dispatch(openDialog(SecurityDialog)); + dispatch(toggleDialog(SecurityDialog)); }; } diff --git a/react/features/security/components/security-dialog/SecurityDialogButton.js b/react/features/security/components/security-dialog/SecurityDialogButton.js index 35df3274d..154b0fa81 100644 --- a/react/features/security/components/security-dialog/SecurityDialogButton.js +++ b/react/features/security/components/security-dialog/SecurityDialogButton.js @@ -5,7 +5,7 @@ import { translate } from '../../../base/i18n'; import { IconSecurityOff, IconSecurityOn } from '../../../base/icons'; import { connect } from '../../../base/redux'; import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox'; -import { openSecurityDialog } from '../../actions'; +import { toggleSecurityDialog } from '../../actions'; type Props = AbstractButtonProps & { @@ -77,7 +77,7 @@ function mapStateToProps(state: Object) { * @returns {Props} */ const mapDispatchToProps = { - onClick: () => openSecurityDialog() + onClick: () => toggleSecurityDialog() }; export default translate(connect(mapStateToProps, mapDispatchToProps)(SecurityDialogButton));