dont show room header and timeline when room cant be peeked (just preview bar)

pull/21833/head
Bruno Windels 2019-04-12 12:47:52 +02:00
parent 0553a6f1d6
commit 16ed06cebb
1 changed files with 7 additions and 20 deletions

View File

@ -1523,16 +1523,6 @@ module.exports = React.createClass({
const roomAlias = this.state.roomAlias; const roomAlias = this.state.roomAlias;
return ( return (
<div className="mx_RoomView"> <div className="mx_RoomView">
<RoomHeader ref="header"
room={this.state.room}
oobData={this.props.oobData}
collapsedRhs={this.props.collapsedRhs}
e2eStatus={this.state.e2eStatus}
/>
<div className="mx_RoomView_body">
<div className="mx_RoomView_auxPanel"></div>
</div>
<div className="mx_RoomView_messagePanel"></div>
<RoomPreviewBar onJoinClick={this.onJoinButtonClicked} <RoomPreviewBar onJoinClick={this.onJoinButtonClicked}
onForgetClick={this.onForgetClick} onForgetClick={this.onForgetClick}
onRejectClick={this.onRejectThreepidInviteButtonClicked} onRejectClick={this.onRejectThreepidInviteButtonClicked}
@ -1570,16 +1560,6 @@ module.exports = React.createClass({
// We have a regular invite for this room. // We have a regular invite for this room.
return ( return (
<div className="mx_RoomView"> <div className="mx_RoomView">
<RoomHeader
ref="header"
room={this.state.room}
collapsedRhs={this.props.collapsedRhs}
e2eStatus={this.state.e2eStatus}
/>
<div className="mx_RoomView_body">
<div className="mx_RoomView_auxPanel"></div>
</div>
<div className="mx_RoomView_messagePanel"></div>
<RoomPreviewBar onJoinClick={this.onJoinButtonClicked} <RoomPreviewBar onJoinClick={this.onJoinButtonClicked}
onForgetClick={this.onForgetClick} onForgetClick={this.onForgetClick}
onRejectClick={this.onRejectButtonClicked} onRejectClick={this.onRejectButtonClicked}
@ -1684,6 +1664,13 @@ module.exports = React.createClass({
room={this.state.room} room={this.state.room}
/> />
); );
if (!this.state.canPeek) {
return (
<div className="mx_RoomView">
{ previewBar }
</div>
);
}
} else if (hiddenHighlightCount > 0) { } else if (hiddenHighlightCount > 0) {
aux = ( aux = (
<AccessibleButton element="div" className="mx_RoomView_auxPanel_hiddenHighlights" <AccessibleButton element="div" className="mx_RoomView_auxPanel_hiddenHighlights"