From bc2eaf3581735e94be0cee3ef6b7241a5650245c Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 9 Feb 2022 13:49:49 +0100 Subject: [PATCH] Remove unused noModal prop --- .../flavours/glitch/features/compose/components/dropdown.js | 5 ++--- .../glitch/features/compose/components/privacy_dropdown.js | 4 +--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/javascript/flavours/glitch/features/compose/components/dropdown.js b/app/javascript/flavours/glitch/features/compose/components/dropdown.js index abf7cbba141..f8fe819a592 100644 --- a/app/javascript/flavours/glitch/features/compose/components/dropdown.js +++ b/app/javascript/flavours/glitch/features/compose/components/dropdown.js @@ -31,7 +31,6 @@ export default class ComposerOptionsDropdown extends React.PureComponent { title: PropTypes.string, value: PropTypes.string, onChange: PropTypes.func, - noModal: PropTypes.bool, container: PropTypes.func, }; @@ -44,10 +43,10 @@ export default class ComposerOptionsDropdown extends React.PureComponent { // Toggles opening and closing the dropdown. handleToggle = ({ target, type }) => { - const { onModalOpen, noModal } = this.props; + const { onModalOpen } = this.props; const { open } = this.state; - if (!noModal && isUserTouching()) { + if (isUserTouching()) { if (this.state.open) { this.props.onModalClose(); } else { diff --git a/app/javascript/flavours/glitch/features/compose/components/privacy_dropdown.js b/app/javascript/flavours/glitch/features/compose/components/privacy_dropdown.js index 39f7c7bd166..d5d29a75168 100644 --- a/app/javascript/flavours/glitch/features/compose/components/privacy_dropdown.js +++ b/app/javascript/flavours/glitch/features/compose/components/privacy_dropdown.js @@ -53,13 +53,12 @@ class PrivacyDropdown extends React.PureComponent { value: PropTypes.string.isRequired, onChange: PropTypes.func.isRequired, noDirect: PropTypes.bool, - noModal: PropTypes.bool, container: PropTypes.func, intl: PropTypes.object.isRequired, }; render () { - const { value, onChange, onModalOpen, onModalClose, disabled, noDirect, noModal, container, intl } = this.props; + const { value, onChange, onModalOpen, onModalClose, disabled, noDirect, container, intl } = this.props; // We predefine our privacy items so that we can easily pick the // dropdown icon later. @@ -106,7 +105,6 @@ class PrivacyDropdown extends React.PureComponent { onModalOpen={onModalOpen} title={intl.formatMessage(messages.change_privacy)} container={container} - noModal={noModal} value={value} /> );