mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-12 22:25:10 +01:00
Remove unused noModal prop
This commit is contained in:
parent
f03dc97070
commit
bc2eaf3581
@ -31,7 +31,6 @@ export default class ComposerOptionsDropdown extends React.PureComponent {
|
|||||||
title: PropTypes.string,
|
title: PropTypes.string,
|
||||||
value: PropTypes.string,
|
value: PropTypes.string,
|
||||||
onChange: PropTypes.func,
|
onChange: PropTypes.func,
|
||||||
noModal: PropTypes.bool,
|
|
||||||
container: PropTypes.func,
|
container: PropTypes.func,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -44,10 +43,10 @@ export default class ComposerOptionsDropdown extends React.PureComponent {
|
|||||||
|
|
||||||
// Toggles opening and closing the dropdown.
|
// Toggles opening and closing the dropdown.
|
||||||
handleToggle = ({ target, type }) => {
|
handleToggle = ({ target, type }) => {
|
||||||
const { onModalOpen, noModal } = this.props;
|
const { onModalOpen } = this.props;
|
||||||
const { open } = this.state;
|
const { open } = this.state;
|
||||||
|
|
||||||
if (!noModal && isUserTouching()) {
|
if (isUserTouching()) {
|
||||||
if (this.state.open) {
|
if (this.state.open) {
|
||||||
this.props.onModalClose();
|
this.props.onModalClose();
|
||||||
} else {
|
} else {
|
||||||
|
@ -53,13 +53,12 @@ class PrivacyDropdown extends React.PureComponent {
|
|||||||
value: PropTypes.string.isRequired,
|
value: PropTypes.string.isRequired,
|
||||||
onChange: PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
noDirect: PropTypes.bool,
|
noDirect: PropTypes.bool,
|
||||||
noModal: PropTypes.bool,
|
|
||||||
container: PropTypes.func,
|
container: PropTypes.func,
|
||||||
intl: PropTypes.object.isRequired,
|
intl: PropTypes.object.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
render () {
|
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
|
// We predefine our privacy items so that we can easily pick the
|
||||||
// dropdown icon later.
|
// dropdown icon later.
|
||||||
@ -106,7 +105,6 @@ class PrivacyDropdown extends React.PureComponent {
|
|||||||
onModalOpen={onModalOpen}
|
onModalOpen={onModalOpen}
|
||||||
title={intl.formatMessage(messages.change_privacy)}
|
title={intl.formatMessage(messages.change_privacy)}
|
||||||
container={container}
|
container={container}
|
||||||
noModal={noModal}
|
|
||||||
value={value}
|
value={value}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user