mirror of https://github.com/vector-im/riot-web
Fix wrong E2E icon in room header for unencrypted local room (#10394)
parent
2344eaab1c
commit
6d15b05b86
|
@ -301,7 +301,7 @@ function LocalRoomView(props: LocalRoomViewProps): ReactElement {
|
||||||
onSearchClick={null}
|
onSearchClick={null}
|
||||||
onInviteClick={null}
|
onInviteClick={null}
|
||||||
onForgetClick={null}
|
onForgetClick={null}
|
||||||
e2eStatus={E2EStatus.Normal}
|
e2eStatus={room.encrypted ? E2EStatus.Normal : undefined}
|
||||||
onAppsClick={null}
|
onAppsClick={null}
|
||||||
appsShown={false}
|
appsShown={false}
|
||||||
excludedRightPanelPhaseButtons={[]}
|
excludedRightPanelPhaseButtons={[]}
|
||||||
|
@ -327,6 +327,7 @@ function LocalRoomView(props: LocalRoomViewProps): ReactElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ILocalRoomCreateLoaderProps {
|
interface ILocalRoomCreateLoaderProps {
|
||||||
|
localRoom: LocalRoom;
|
||||||
names: string;
|
names: string;
|
||||||
resizeNotifier: ResizeNotifier;
|
resizeNotifier: ResizeNotifier;
|
||||||
}
|
}
|
||||||
|
@ -350,7 +351,7 @@ function LocalRoomCreateLoader(props: ILocalRoomCreateLoaderProps): ReactElement
|
||||||
onSearchClick={null}
|
onSearchClick={null}
|
||||||
onInviteClick={null}
|
onInviteClick={null}
|
||||||
onForgetClick={null}
|
onForgetClick={null}
|
||||||
e2eStatus={E2EStatus.Normal}
|
e2eStatus={props.localRoom.encrypted ? E2EStatus.Normal : undefined}
|
||||||
onAppsClick={null}
|
onAppsClick={null}
|
||||||
appsShown={false}
|
appsShown={false}
|
||||||
excludedRightPanelPhaseButtons={[]}
|
excludedRightPanelPhaseButtons={[]}
|
||||||
|
@ -1918,11 +1919,11 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
||||||
return this.getPermalinkCreatorForRoom(this.state.room);
|
return this.getPermalinkCreatorForRoom(this.state.room);
|
||||||
}
|
}
|
||||||
|
|
||||||
private renderLocalRoomCreateLoader(): ReactElement {
|
private renderLocalRoomCreateLoader(localRoom: LocalRoom): ReactElement {
|
||||||
const names = this.state.room.getDefaultRoomName(this.context.client.getUserId());
|
const names = this.state.room.getDefaultRoomName(this.context.client.getUserId());
|
||||||
return (
|
return (
|
||||||
<RoomContext.Provider value={this.state}>
|
<RoomContext.Provider value={this.state}>
|
||||||
<LocalRoomCreateLoader names={names} resizeNotifier={this.props.resizeNotifier} />
|
<LocalRoomCreateLoader localRoom={localRoom} names={names} resizeNotifier={this.props.resizeNotifier} />
|
||||||
</RoomContext.Provider>
|
</RoomContext.Provider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1956,7 +1957,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
||||||
public render(): React.ReactNode {
|
public render(): React.ReactNode {
|
||||||
if (this.state.room instanceof LocalRoom) {
|
if (this.state.room instanceof LocalRoom) {
|
||||||
if (this.state.room.state === LocalRoomState.CREATING) {
|
if (this.state.room.state === LocalRoomState.CREATING) {
|
||||||
return this.renderLocalRoomCreateLoader();
|
return this.renderLocalRoomCreateLoader(this.state.room);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.renderLocalRoomView(this.state.room);
|
return this.renderLocalRoomView(this.state.room);
|
||||||
|
|
|
@ -39,9 +39,6 @@ exports[`RoomView for a local room in state CREATING should match the snapshot 1
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
|
||||||
class="mx_E2EIcon mx_E2EIcon_normal mx_RoomHeader_icon"
|
|
||||||
/>
|
|
||||||
<div
|
<div
|
||||||
class="mx_RoomHeader_name mx_RoomHeader_name--textonly"
|
class="mx_RoomHeader_name mx_RoomHeader_name--textonly"
|
||||||
>
|
>
|
||||||
|
@ -136,9 +133,6 @@ exports[`RoomView for a local room in state ERROR should match the snapshot 1`]
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
|
||||||
class="mx_E2EIcon mx_E2EIcon_normal mx_RoomHeader_icon"
|
|
||||||
/>
|
|
||||||
<div
|
<div
|
||||||
class="mx_RoomHeader_name mx_RoomHeader_name--textonly"
|
class="mx_RoomHeader_name mx_RoomHeader_name--textonly"
|
||||||
>
|
>
|
||||||
|
@ -329,9 +323,6 @@ exports[`RoomView for a local room in state NEW should match the snapshot 1`] =
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
|
||||||
class="mx_E2EIcon mx_E2EIcon_normal mx_RoomHeader_icon"
|
|
||||||
/>
|
|
||||||
<div
|
<div
|
||||||
class="mx_RoomHeader_name mx_RoomHeader_name--textonly"
|
class="mx_RoomHeader_name mx_RoomHeader_name--textonly"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue