Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix RoomView re-mounting breaking peeking #5602

Merged
merged 1 commit into from
Feb 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/components/structures/RoomView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,6 @@ export default class RoomView extends React.Component<IProps, IState> {
this.layoutWatcherRef = SettingsStore.watchSetting("useIRCLayout", null, this.onLayoutChange);
}

// TODO: [REACT-WARNING] Move into constructor
// eslint-disable-next-line camelcase
UNSAFE_componentWillMount() {
this.onRoomViewStoreUpdate(true);
}

private onWidgetStoreUpdate = () => {
if (this.state.room) {
this.checkWidgets(this.state.room);
Expand Down Expand Up @@ -512,6 +506,8 @@ export default class RoomView extends React.Component<IProps, IState> {
}

componentDidMount() {
this.onRoomViewStoreUpdate(true);

const call = this.getCallForRoom();
const callState = call ? call.state : null;
this.setState({
Expand Down