mirror of https://github.com/vector-im/riot-web
Fix right panel for peeking rooms
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
parent
7fa1214cf1
commit
a9cee7cf70
|
@ -1820,7 +1820,6 @@ export default class RoomView extends React.Component<IProps, IState> {
|
||||||
let aux = null;
|
let aux = null;
|
||||||
let previewBar;
|
let previewBar;
|
||||||
let hideCancel = false;
|
let hideCancel = false;
|
||||||
let forceHideRightPanel = false;
|
|
||||||
if (this.state.forwardingEvent) {
|
if (this.state.forwardingEvent) {
|
||||||
aux = <ForwardMessage onCancelClick={this.onCancelClick} />;
|
aux = <ForwardMessage onCancelClick={this.onCancelClick} />;
|
||||||
} else if (this.state.searching) {
|
} else if (this.state.searching) {
|
||||||
|
@ -1865,8 +1864,6 @@ export default class RoomView extends React.Component<IProps, IState> {
|
||||||
{ previewBar }
|
{ previewBar }
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
} else {
|
|
||||||
forceHideRightPanel = true;
|
|
||||||
}
|
}
|
||||||
} else if (hiddenHighlightCount > 0) {
|
} else if (hiddenHighlightCount > 0) {
|
||||||
aux = (
|
aux = (
|
||||||
|
@ -2069,7 +2066,7 @@ export default class RoomView extends React.Component<IProps, IState> {
|
||||||
"mx_fadable_faded": this.props.disabled,
|
"mx_fadable_faded": this.props.disabled,
|
||||||
});
|
});
|
||||||
|
|
||||||
const showRightPanel = !forceHideRightPanel && this.state.room && this.state.showRightPanel;
|
const showRightPanel = this.state.room && this.state.showRightPanel;
|
||||||
const rightPanel = showRightPanel
|
const rightPanel = showRightPanel
|
||||||
? <RightPanel room={this.state.room} resizeNotifier={this.props.resizeNotifier} />
|
? <RightPanel room={this.state.room} resizeNotifier={this.props.resizeNotifier} />
|
||||||
: null;
|
: null;
|
||||||
|
|
|
@ -121,8 +121,8 @@ export default class MemberList extends React.Component {
|
||||||
this.setState(this._getMembersState(this.roomMembers()));
|
this.setState(this._getMembersState(this.roomMembers()));
|
||||||
this._listenForMembersChanges();
|
this._listenForMembersChanges();
|
||||||
}
|
}
|
||||||
} else if (membership === "invite") {
|
} else {
|
||||||
// show the members we've got when invited
|
// show the members we already have loaded
|
||||||
this.setState(this._getMembersState(this.roomMembers()));
|
this.setState(this._getMembersState(this.roomMembers()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,6 +118,7 @@ export default class WidgetStore extends AsyncStoreWithClient<IState> {
|
||||||
}
|
}
|
||||||
|
|
||||||
private loadRoomWidgets(room: Room) {
|
private loadRoomWidgets(room: Room) {
|
||||||
|
if (!room) return;
|
||||||
const roomInfo = this.roomMap.get(room.roomId);
|
const roomInfo = this.roomMap.get(room.roomId);
|
||||||
roomInfo.widgets = [];
|
roomInfo.widgets = [];
|
||||||
this.generateApps(room).forEach(app => {
|
this.generateApps(room).forEach(app => {
|
||||||
|
|
Loading…
Reference in New Issue