From: Eugen Rochko Date: Sat, 5 May 2018 21:05:43 +0000 (+0200) Subject: Do not count search route as compose being mounted in web UI (#7372) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=660db468c09146802bd4418599cf4103ef190c10;p=mastodon.git Do not count search route as compose being mounted in web UI (#7372) Fix #7144 --- diff --git a/app/javascript/mastodon/features/compose/index.js b/app/javascript/mastodon/features/compose/index.js index 67f0e7981..19aae0332 100644 --- a/app/javascript/mastodon/features/compose/index.js +++ b/app/javascript/mastodon/features/compose/index.js @@ -43,11 +43,19 @@ export default class Compose extends React.PureComponent { }; componentDidMount () { - this.props.dispatch(mountCompose()); + const { isSearchPage } = this.props; + + if (!isSearchPage) { + this.props.dispatch(mountCompose()); + } } componentWillUnmount () { - this.props.dispatch(unmountCompose()); + const { isSearchPage } = this.props; + + if (!isSearchPage) { + this.props.dispatch(unmountCompose()); + } } onFocus = () => {