diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index e6eca5023f..645ceee56d 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -2097,13 +2097,15 @@ export class RoomView extends React.Component { } } + const roomHeaderType = SettingsStore.getValue("feature_new_room_decoration_ui") ? "new" : "legacy"; + if (!this.state.room) { const loading = !this.state.matrixClientIsReady || this.state.roomLoading || this.state.peekLoading; if (loading) { // Assume preview loading if we don't have a ready client or a room ID (still resolving the alias) const previewLoading = !this.state.matrixClientIsReady || !this.state.roomId || this.state.peekLoading; return ( -
+
{ // We've got to this room by following a link, possibly a third party invite. const roomAlias = this.state.roomAlias; return ( -
+
{ // We have a regular invite for this room. return ( -
+
{ if (this.state.canAskToJoin && ["knock", "leave"].includes(myMembership)) { return ( -
+
{ /> ); if (!this.state.canPeek && !this.state.room?.isSpaceRoom()) { - return
{previewBar}
; + return ( +
+ {previewBar} +
+ ); } } else if (hiddenHighlightCount > 0) { aux = ( @@ -2571,7 +2577,12 @@ export class RoomView extends React.Component { return ( -
+
{showChatEffects && this.roomView.current && ( )} diff --git a/test/components/structures/__snapshots__/RoomView-test.tsx.snap b/test/components/structures/__snapshots__/RoomView-test.tsx.snap index 9fe61c5e6c..a3a2eaea61 100644 --- a/test/components/structures/__snapshots__/RoomView-test.tsx.snap +++ b/test/components/structures/__snapshots__/RoomView-test.tsx.snap @@ -736,6 +736,7 @@ exports[`RoomView should show error view if failed to look up room alias 1`] = `