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:
Florian Duros
2025-11-21 13:45:22 +00:00
committed by GitHub
parent 81c375007e
commit a79f6e7aa5
3 changed files with 421 additions and 19 deletions
+6 -1
View File
@@ -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} />
);