Merge pull request #6046 from matrix-org/gsouquet/sync-perf
commit
f67ba57da5
|
@ -27,7 +27,7 @@ import CallMediaHandler from '../../CallMediaHandler';
|
||||||
import { fixupColorFonts } from '../../utils/FontManager';
|
import { fixupColorFonts } from '../../utils/FontManager';
|
||||||
import * as sdk from '../../index';
|
import * as sdk from '../../index';
|
||||||
import dis from '../../dispatcher/dispatcher';
|
import dis from '../../dispatcher/dispatcher';
|
||||||
import {MatrixClientPeg, IMatrixClientCreds} from '../../MatrixClientPeg';
|
import { IMatrixClientCreds } from '../../MatrixClientPeg';
|
||||||
import SettingsStore from "../../settings/SettingsStore";
|
import SettingsStore from "../../settings/SettingsStore";
|
||||||
|
|
||||||
import TagOrderActions from '../../actions/TagOrderActions';
|
import TagOrderActions from '../../actions/TagOrderActions';
|
||||||
|
@ -219,16 +219,6 @@ class LoggedInView extends React.Component<IProps, IState> {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// Child components assume that the client peg will not be null, so give them some
|
|
||||||
// sort of assurance here by only allowing a re-render if the client is truthy.
|
|
||||||
//
|
|
||||||
// This is required because `LoggedInView` maintains its own state and if this state
|
|
||||||
// updates after the client peg has been made null (during logout), then it will
|
|
||||||
// attempt to re-render and the children will throw errors.
|
|
||||||
shouldComponentUpdate() {
|
|
||||||
return Boolean(MatrixClientPeg.get());
|
|
||||||
}
|
|
||||||
|
|
||||||
canResetTimelineInRoom = (roomId) => {
|
canResetTimelineInRoom = (roomId) => {
|
||||||
if (!this._roomView.current) {
|
if (!this._roomView.current) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue