From 0cef706b6a116755355c74d0ea793764b0585aeb Mon Sep 17 00:00:00 2001 From: damencho Date: Fri, 17 Jul 2020 10:48:23 -0500 Subject: [PATCH] feat: Changes security dialog button to toggle dialog. --- react/features/security/actions.js | 8 ++++---- .../components/security-dialog/SecurityDialogButton.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) 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));