Mastodon: don't conditionally render chat routes (this causes bugs)
This commit is contained in:
parent
e5e15fc3f0
commit
64e2f53692
|
@ -161,7 +161,6 @@ class SwitchingColumnsArea extends React.PureComponent {
|
||||||
children: PropTypes.node,
|
children: PropTypes.node,
|
||||||
location: PropTypes.object,
|
location: PropTypes.object,
|
||||||
onLayoutChange: PropTypes.func.isRequired,
|
onLayoutChange: PropTypes.func.isRequired,
|
||||||
features: PropTypes.object.isRequired,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
state = {
|
state = {
|
||||||
|
@ -190,7 +189,7 @@ class SwitchingColumnsArea extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { children, features } = this.props;
|
const { children } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Switch>
|
<Switch>
|
||||||
|
@ -240,10 +239,8 @@ class SwitchingColumnsArea extends React.PureComponent {
|
||||||
|
|
||||||
<WrappedRoute path='/search' publicRoute page={DefaultPage} component={Search} content={children} />
|
<WrappedRoute path='/search' publicRoute page={DefaultPage} component={Search} content={children} />
|
||||||
|
|
||||||
{features.chats && <>
|
|
||||||
<WrappedRoute path='/chats' exact page={DefaultPage} component={ChatIndex} content={children} />
|
<WrappedRoute path='/chats' exact page={DefaultPage} component={ChatIndex} content={children} />
|
||||||
<WrappedRoute path='/chats/:chatId' page={DefaultPage} component={ChatRoom} content={children} />
|
<WrappedRoute path='/chats/:chatId' page={DefaultPage} component={ChatRoom} content={children} />
|
||||||
</>}
|
|
||||||
|
|
||||||
<WrappedRoute path='/follow_requests' page={DefaultPage} component={FollowRequests} content={children} />
|
<WrappedRoute path='/follow_requests' page={DefaultPage} component={FollowRequests} content={children} />
|
||||||
<WrappedRoute path='/blocks' page={DefaultPage} component={Blocks} content={children} />
|
<WrappedRoute path='/blocks' page={DefaultPage} component={Blocks} content={children} />
|
||||||
|
@ -634,7 +631,7 @@ class UI extends React.PureComponent {
|
||||||
<HotKeys keyMap={keyMap} handlers={handlers} ref={this.setHotkeysRef} attach={window} focused>
|
<HotKeys keyMap={keyMap} handlers={handlers} ref={this.setHotkeysRef} attach={window} focused>
|
||||||
<div className={classnames} ref={this.setRef} style={style}>
|
<div className={classnames} ref={this.setRef} style={style}>
|
||||||
<TabsBar />
|
<TabsBar />
|
||||||
<SwitchingColumnsArea location={location} onLayoutChange={this.handleLayoutChange} features={features}>
|
<SwitchingColumnsArea location={location} onLayoutChange={this.handleLayoutChange}>
|
||||||
{children}
|
{children}
|
||||||
</SwitchingColumnsArea>
|
</SwitchingColumnsArea>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue