mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
hide breadcrumbs when collapsed
This commit is contained in:
parent
5efd92f3ec
commit
735c9d1121
@ -216,13 +216,12 @@ const LeftPanel = React.createClass({
|
||||
onCleared={ this.onSearchCleared }
|
||||
collapsed={this.props.collapsed} />);
|
||||
|
||||
|
||||
return (
|
||||
<div className={containerClasses}>
|
||||
{ tagPanelContainer }
|
||||
<aside className={"mx_LeftPanel dark-panel"} onKeyDown={ this._onKeyDown } onFocus={ this._onFocus } onBlur={ this._onBlur }>
|
||||
<TopLeftMenuButton collapsed={ this.props.collapsed } />
|
||||
<RoomBreadcrumbs />
|
||||
<RoomBreadcrumbs collapsed={this.props.collapsed} />
|
||||
{ searchBox }
|
||||
<CallPreview ConferenceHandler={VectorConferenceHandler} />
|
||||
<RoomList
|
||||
|
@ -72,6 +72,13 @@ export default class RoomBreadcrumbs extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
// check for collapsed here and
|
||||
// not at parent so we keep
|
||||
// rooms in our state
|
||||
// when collapsing and expanding
|
||||
if (this.props.collapsed) {
|
||||
return null;
|
||||
}
|
||||
const avatars = this.state.rooms.map((room) => {
|
||||
return (
|
||||
<AccessibleButton key={room.roomId} title={room.name} onClick={() => this._viewRoom(room)}>
|
||||
|
Loading…
Reference in New Issue
Block a user