]> cat aescling's git repositories - mastodon.git/commitdiff
Remove unused noModal prop
authorClaire <claire.github-309c@sitedethib.com>
Wed, 9 Feb 2022 12:49:49 +0000 (13:49 +0100)
committerClaire <claire.github-309c@sitedethib.com>
Wed, 9 Feb 2022 15:40:23 +0000 (16:40 +0100)
app/javascript/flavours/glitch/features/compose/components/dropdown.js
app/javascript/flavours/glitch/features/compose/components/privacy_dropdown.js

index abf7cbba141a68e3539797e99e5029d0c97f85bc..f8fe819a5922cc320d9c94fa59a133e7bfc8a401 100644 (file)
@@ -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 {
index 39f7c7bd16694410fb0343bc36a1b91c1846b40e..d5d29a75168d1853c2de100542b7ac96eab30779 100644 (file)
@@ -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}
       />
     );