Do not count search route as compose being mounted in web UI (#7372)

Fix #7144
lolsob-rspec
Eugen Rochko 2018-05-05 23:05:43 +02:00 committed by GitHub
parent 0de45574e0
commit b7f241faed
1 changed files with 10 additions and 2 deletions

View File

@ -43,12 +43,20 @@ export default class Compose extends React.PureComponent {
};
componentDidMount () {
const { isSearchPage } = this.props;
if (!isSearchPage) {
this.props.dispatch(mountCompose());
}
}
componentWillUnmount () {
const { isSearchPage } = this.props;
if (!isSearchPage) {
this.props.dispatch(unmountCompose());
}
}
onFocus = () => {
this.props.dispatch(changeComposing(true));