Hide composer and call buttons when the room is tombstoned (#7975)
This commit is contained in:
parent
675b4271e9
commit
0e60ad98c1
11 changed files with 196 additions and 93 deletions
|
@ -40,6 +40,7 @@ import { contextMenuBelow } from './RoomTile';
|
|||
import { RoomNotificationStateStore } from '../../../stores/notifications/RoomNotificationStateStore';
|
||||
import { RightPanelPhases } from '../../../stores/right-panel/RightPanelStorePhases';
|
||||
import { NotificationStateEvents } from '../../../stores/notifications/NotificationState';
|
||||
import RoomContext from "../../../contexts/RoomContext";
|
||||
|
||||
export interface ISearchInfo {
|
||||
searchTerm: string;
|
||||
|
@ -73,6 +74,9 @@ export default class RoomHeader extends React.Component<IProps, IState> {
|
|||
excludedRightPanelPhaseButtons: [],
|
||||
};
|
||||
|
||||
static contextType = RoomContext;
|
||||
public context!: React.ContextType<typeof RoomContext>;
|
||||
|
||||
constructor(props, context) {
|
||||
super(props, context);
|
||||
const notiStore = RoomNotificationStateStore.instance.getRoomState(props.room);
|
||||
|
@ -200,7 +204,10 @@ export default class RoomHeader extends React.Component<IProps, IState> {
|
|||
|
||||
const buttons: JSX.Element[] = [];
|
||||
|
||||
if (this.props.inRoom && SettingsStore.getValue("showCallButtonsInComposer")) {
|
||||
if (this.props.inRoom &&
|
||||
!this.context.tombstone &&
|
||||
SettingsStore.getValue("showCallButtonsInComposer")
|
||||
) {
|
||||
const voiceCallButton = <AccessibleTooltipButton
|
||||
className="mx_RoomHeader_button mx_RoomHeader_voiceCallButton"
|
||||
onClick={() => this.props.onCallPlaced(CallType.Voice)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue