Skip to content

Commit

Permalink
Check room encryption earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
florianduros committed Nov 27, 2024
1 parent af3a977 commit db743ae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/structures/RoomView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,11 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
if (initial) {
this.setupRoom(newState.room, newState.roomId, !!newState.joining, !!newState.shouldPeek);
}

// We don't block the initial setup but we want to make it early to not block the timeline rendering
this.setState({
isRoomEncrypted: roomId ? await this.getIsRoomEncrypted(roomId) : null,
});
};

private onConnectedCalls = (): void => {
Expand Down Expand Up @@ -863,7 +868,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
return isManuallyShown && widgets.length > 0;
}

public async componentDidMount(): Promise<void> {
public componentDidMount(): void {
this.unmounted = false;

this.dispatcherRef = defaultDispatcher.register(this.onAction);
Expand Down

0 comments on commit db743ae

Please sign in to comment.