You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-11-28 09:24:05 +03:00
dont show right panel when previewing a room without invite, as its empty
This commit is contained in:
@@ -1647,6 +1647,7 @@ module.exports = React.createClass({
|
|||||||
let aux = null;
|
let aux = null;
|
||||||
let previewBar;
|
let previewBar;
|
||||||
let hideCancel = false;
|
let hideCancel = false;
|
||||||
|
let hideRightPanel = false;
|
||||||
if (this.state.forwardingEvent !== null) {
|
if (this.state.forwardingEvent !== null) {
|
||||||
aux = <ForwardMessage onCancelClick={this.onCancelClick} />;
|
aux = <ForwardMessage onCancelClick={this.onCancelClick} />;
|
||||||
} else if (this.state.searching) {
|
} else if (this.state.searching) {
|
||||||
@@ -1690,6 +1691,8 @@ module.exports = React.createClass({
|
|||||||
{ previewBar }
|
{ previewBar }
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
hideRightPanel = true;
|
||||||
}
|
}
|
||||||
} else if (hiddenHighlightCount > 0) {
|
} else if (hiddenHighlightCount > 0) {
|
||||||
aux = (
|
aux = (
|
||||||
@@ -1861,14 +1864,16 @@ module.exports = React.createClass({
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const rightPanel = this.state.room ? <RightPanel roomId={this.state.room.roomId} resizeNotifier={this.props.resizeNotifier} /> : undefined;
|
const rightPanel = !hideRightPanel && this.state.room &&
|
||||||
|
<RightPanel roomId={this.state.room.roomId} resizeNotifier={this.props.resizeNotifier} />;
|
||||||
|
const collapsedRhs = hideRightPanel || this.props.collapsedRhs;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<main className={"mx_RoomView" + (inCall ? " mx_RoomView_inCall" : "")} ref="roomView">
|
<main className={"mx_RoomView" + (inCall ? " mx_RoomView_inCall" : "")} ref="roomView">
|
||||||
<RoomHeader ref="header" room={this.state.room} searchInfo={searchInfo}
|
<RoomHeader ref="header" room={this.state.room} searchInfo={searchInfo}
|
||||||
oobData={this.props.oobData}
|
oobData={this.props.oobData}
|
||||||
inRoom={myMembership === 'join'}
|
inRoom={myMembership === 'join'}
|
||||||
collapsedRhs={this.props.collapsedRhs}
|
collapsedRhs={collapsedRhs}
|
||||||
onSearchClick={this.onSearchClick}
|
onSearchClick={this.onSearchClick}
|
||||||
onSettingsClick={this.onSettingsClick}
|
onSettingsClick={this.onSettingsClick}
|
||||||
onPinnedClick={this.onPinnedClick}
|
onPinnedClick={this.onPinnedClick}
|
||||||
@@ -1879,7 +1884,7 @@ module.exports = React.createClass({
|
|||||||
/>
|
/>
|
||||||
<MainSplit
|
<MainSplit
|
||||||
panel={rightPanel}
|
panel={rightPanel}
|
||||||
collapsedRhs={this.props.collapsedRhs}
|
collapsedRhs={collapsedRhs}
|
||||||
resizeNotifier={this.props.resizeNotifier}
|
resizeNotifier={this.props.resizeNotifier}
|
||||||
>
|
>
|
||||||
<div className={fadableSectionClasses}>
|
<div className={fadableSectionClasses}>
|
||||||
|
|||||||
Reference in New Issue
Block a user