mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Do not count search route as compose being mounted in web UI (#7372)
Fix #7144
This commit is contained in:
parent
8da4bf0f90
commit
660db468c0
@ -43,11 +43,19 @@ export default class Compose extends React.PureComponent {
|
|||||||
};
|
};
|
||||||
|
|
||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
this.props.dispatch(mountCompose());
|
const { isSearchPage } = this.props;
|
||||||
|
|
||||||
|
if (!isSearchPage) {
|
||||||
|
this.props.dispatch(mountCompose());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount () {
|
componentWillUnmount () {
|
||||||
this.props.dispatch(unmountCompose());
|
const { isSearchPage } = this.props;
|
||||||
|
|
||||||
|
if (!isSearchPage) {
|
||||||
|
this.props.dispatch(unmountCompose());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onFocus = () => {
|
onFocus = () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user