Add option to hide pinned message banner in room view (#31296)
* feat: add `hidePinnedMessageBanner` to room view * test: add test for `hidePinnedMessageBanner`
This commit is contained in:
@@ -180,6 +180,11 @@ interface IRoomProps extends RoomViewProps {
|
||||
* If true, hide the right panel
|
||||
*/
|
||||
hideRightPanel?: boolean;
|
||||
|
||||
/**
|
||||
* If true, hide the pinned messages banner
|
||||
*/
|
||||
hidePinnedMessageBanner?: boolean;
|
||||
}
|
||||
|
||||
export { MainSplitContentType };
|
||||
@@ -2464,7 +2469,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
||||
</AuxPanel>
|
||||
);
|
||||
|
||||
const pinnedMessageBanner = (
|
||||
const pinnedMessageBanner = !this.props.hidePinnedMessageBanner && (
|
||||
<PinnedMessageBanner room={this.state.room} permalinkCreator={this.permalinkCreator} />
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user