mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 12:45:11 +08:00
Close right panel chat when minimising maximised voip widget (#28241)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
249c0fd1df
commit
3294c6b5c5
@ -579,18 +579,21 @@ export default class AppTile extends React.Component<IProps, IState> {
|
|||||||
: Container.Center;
|
: Container.Center;
|
||||||
WidgetLayoutStore.instance.moveToContainer(this.props.room, this.props.app, targetContainer);
|
WidgetLayoutStore.instance.moveToContainer(this.props.room, this.props.app, targetContainer);
|
||||||
|
|
||||||
// If the right panel has a timeline, but we're about to show the timeline in the main view, pop the right panel
|
if (targetContainer === Container.Top) this.closeChatCardIfNeeded();
|
||||||
if (
|
|
||||||
targetContainer === Container.Top &&
|
|
||||||
RightPanelStore.instance.currentCardForRoom(this.props.room.roomId).phase === RightPanelPhases.Timeline
|
|
||||||
) {
|
|
||||||
RightPanelStore.instance.popCard(this.props.room.roomId);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
private onMinimiseClicked = (): void => {
|
private onMinimiseClicked = (): void => {
|
||||||
if (!this.props.room) return; // ignore action - it shouldn't even be visible
|
if (!this.props.room) return; // ignore action - it shouldn't even be visible
|
||||||
WidgetLayoutStore.instance.moveToContainer(this.props.room, this.props.app, Container.Right);
|
WidgetLayoutStore.instance.moveToContainer(this.props.room, this.props.app, Container.Right);
|
||||||
|
this.closeChatCardIfNeeded();
|
||||||
|
};
|
||||||
|
|
||||||
|
private closeChatCardIfNeeded = (): void => {
|
||||||
|
if (!this.props.room) return; // ignore action - it shouldn't even be visible
|
||||||
|
// If the right panel has a timeline, but we're about to show the timeline in the main view, pop the right panel
|
||||||
|
if (RightPanelStore.instance.currentCardForRoom(this.props.room.roomId).phase === RightPanelPhases.Timeline) {
|
||||||
|
RightPanelStore.instance.popCard(this.props.room.roomId);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private onContextMenuClick = (): void => {
|
private onContextMenuClick = (): void => {
|
||||||
|
Loading…
Reference in New Issue
Block a user