diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index bc533a137f..68f64aa622 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -301,7 +301,7 @@ function LocalRoomView(props: LocalRoomViewProps): ReactElement { onSearchClick={null} onInviteClick={null} onForgetClick={null} - e2eStatus={E2EStatus.Normal} + e2eStatus={room.encrypted ? E2EStatus.Normal : undefined} onAppsClick={null} appsShown={false} excludedRightPanelPhaseButtons={[]} @@ -327,6 +327,7 @@ function LocalRoomView(props: LocalRoomViewProps): ReactElement { } interface ILocalRoomCreateLoaderProps { + localRoom: LocalRoom; names: string; resizeNotifier: ResizeNotifier; } @@ -350,7 +351,7 @@ function LocalRoomCreateLoader(props: ILocalRoomCreateLoaderProps): ReactElement onSearchClick={null} onInviteClick={null} onForgetClick={null} - e2eStatus={E2EStatus.Normal} + e2eStatus={props.localRoom.encrypted ? E2EStatus.Normal : undefined} onAppsClick={null} appsShown={false} excludedRightPanelPhaseButtons={[]} @@ -1918,11 +1919,11 @@ export class RoomView extends React.Component { return this.getPermalinkCreatorForRoom(this.state.room); } - private renderLocalRoomCreateLoader(): ReactElement { + private renderLocalRoomCreateLoader(localRoom: LocalRoom): ReactElement { const names = this.state.room.getDefaultRoomName(this.context.client.getUserId()); return ( - + ); } @@ -1956,7 +1957,7 @@ export class RoomView extends React.Component { public render(): React.ReactNode { if (this.state.room instanceof LocalRoom) { if (this.state.room.state === LocalRoomState.CREATING) { - return this.renderLocalRoomCreateLoader(); + return this.renderLocalRoomCreateLoader(this.state.room); } return this.renderLocalRoomView(this.state.room); diff --git a/test/components/structures/__snapshots__/RoomView-test.tsx.snap b/test/components/structures/__snapshots__/RoomView-test.tsx.snap index d9e3f08a52..4399ff471f 100644 --- a/test/components/structures/__snapshots__/RoomView-test.tsx.snap +++ b/test/components/structures/__snapshots__/RoomView-test.tsx.snap @@ -39,9 +39,6 @@ exports[`RoomView for a local room in state CREATING should match the snapshot 1 -
@@ -136,9 +133,6 @@ exports[`RoomView for a local room in state ERROR should match the snapshot 1`]
-
@@ -329,9 +323,6 @@ exports[`RoomView for a local room in state NEW should match the snapshot 1`] =
-