mirror of
https://github.com/element-hq/element-web
synced 2024-11-23 01:35:49 +03:00
Don't hide room header buttons in video rooms and rooms with a call (#9712)
* Don't hide room header buttons in video rooms and rooms with a call Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Fix types Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Attempt to fix types 2 Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Delint Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Update test case --------- Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
0b0d77cbcc
commit
3b0ed17241
2 changed files with 3 additions and 13 deletions
|
@ -160,7 +160,7 @@ describe("Room Header", () => {
|
|||
}
|
||||
|
||||
// Assert that there is not a button except those buttons
|
||||
cy.findAllByRole("button").should("have.length", 5);
|
||||
cy.findAllByRole("button").should("have.length", 7);
|
||||
});
|
||||
|
||||
cy.get(".mx_RoomHeader").percySnapshotElement("Room header - with a video room");
|
||||
|
|
|
@ -2433,23 +2433,13 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
|||
// Simplify the header for other main split types
|
||||
switch (this.state.mainSplitContentType) {
|
||||
case MainSplitContentType.MaximisedWidget:
|
||||
excludedRightPanelPhaseButtons = [RightPanelPhases.ThreadPanel, RightPanelPhases.PinnedMessages];
|
||||
excludedRightPanelPhaseButtons = [];
|
||||
onAppsClick = null;
|
||||
onForgetClick = null;
|
||||
onSearchClick = null;
|
||||
break;
|
||||
case MainSplitContentType.Call:
|
||||
excludedRightPanelPhaseButtons = [
|
||||
RightPanelPhases.ThreadPanel,
|
||||
RightPanelPhases.PinnedMessages,
|
||||
RightPanelPhases.NotificationPanel,
|
||||
];
|
||||
if (!isVideoRoom(this.state.room)) {
|
||||
excludedRightPanelPhaseButtons.push(RightPanelPhases.RoomSummary);
|
||||
if (this.state.activeCall === null) {
|
||||
excludedRightPanelPhaseButtons.push(RightPanelPhases.Timeline);
|
||||
}
|
||||
}
|
||||
excludedRightPanelPhaseButtons = [];
|
||||
onAppsClick = null;
|
||||
onForgetClick = null;
|
||||
onSearchClick = null;
|
||||
|
|
Loading…
Reference in a new issue