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

Commit f67ba57

Browse files
authored
Merge pull request #6046 from matrix-org/gsouquet/sync-perf
2 parents 12a9ce1 + 7e846b8 commit f67ba57

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/components/structures/LoggedInView.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import CallMediaHandler from '../../CallMediaHandler';
2727
import { fixupColorFonts } from '../../utils/FontManager';
2828
import * as sdk from '../../index';
2929
import dis from '../../dispatcher/dispatcher';
30-
import {MatrixClientPeg, IMatrixClientCreds} from '../../MatrixClientPeg';
30+
import { IMatrixClientCreds } from '../../MatrixClientPeg';
3131
import SettingsStore from "../../settings/SettingsStore";
3232

3333
import TagOrderActions from '../../actions/TagOrderActions';
@@ -219,16 +219,6 @@ class LoggedInView extends React.Component<IProps, IState> {
219219
});
220220
};
221221

222-
// Child components assume that the client peg will not be null, so give them some
223-
// sort of assurance here by only allowing a re-render if the client is truthy.
224-
//
225-
// This is required because `LoggedInView` maintains its own state and if this state
226-
// updates after the client peg has been made null (during logout), then it will
227-
// attempt to re-render and the children will throw errors.
228-
shouldComponentUpdate() {
229-
return Boolean(MatrixClientPeg.get());
230-
}
231-
232222
canResetTimelineInRoom = (roomId) => {
233223
if (!this._roomView.current) {
234224
return true;

0 commit comments

Comments
 (0)