Revert to UNSAFE_componentWillMount where componentDidMount will not work
This commit is contained in:
parent
3f99332f4b
commit
8f04746e4e
7 changed files with 14 additions and 7 deletions
|
@ -221,7 +221,8 @@ export default createReactClass({
|
||||||
return {serverConfig: props};
|
return {serverConfig: props};
|
||||||
},
|
},
|
||||||
|
|
||||||
componentDidMount: function() {
|
// TODO: [REACT-WARNING] Move this to constructor
|
||||||
|
UNSAFE_componentWillMount: function() {
|
||||||
SdkConfig.put(this.props.config);
|
SdkConfig.put(this.props.config);
|
||||||
|
|
||||||
// Used by _viewRoom before getting state from sync
|
// Used by _viewRoom before getting state from sync
|
||||||
|
|
|
@ -56,7 +56,8 @@ export default createReactClass({
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
componentDidMount: function() {
|
// TODO: [REACT-WARNING] Move this to constructor
|
||||||
|
UNSAFE_componentWillMount: function() {
|
||||||
this._unmounted = false;
|
this._unmounted = false;
|
||||||
this.nextBatch = null;
|
this.nextBatch = null;
|
||||||
this.filterTimeout = null;
|
this.filterTimeout = null;
|
||||||
|
|
|
@ -113,7 +113,8 @@ export default createReactClass({
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
componentDidMount: function() {
|
// TODO: [REACT-WARNING] Move this to constructor
|
||||||
|
UNSAFE_componentWillMount: function() {
|
||||||
this._unmounted = false;
|
this._unmounted = false;
|
||||||
|
|
||||||
// map from login step type to a function which will render a control
|
// map from login step type to a function which will render a control
|
||||||
|
|
|
@ -55,7 +55,8 @@ export default createReactClass({
|
||||||
askReason: false,
|
askReason: false,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
componentDidMount: function() {
|
// TODO: [REACT-WARNING] Move this to constructor
|
||||||
|
UNSAFE_componentWillMount: function() {
|
||||||
this._reasonField = null;
|
this._reasonField = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,8 @@ export default createReactClass({
|
||||||
contextType: MatrixClientContext,
|
contextType: MatrixClientContext,
|
||||||
},
|
},
|
||||||
|
|
||||||
componentDidMount: function() {
|
// TODO: [REACT-WARNING] Move this to constructor
|
||||||
|
UNSAFE_componentWillMount: function() {
|
||||||
this._cancelDeviceList = null;
|
this._cancelDeviceList = null;
|
||||||
const cli = this.context;
|
const cli = this.context;
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,8 @@ export default createReactClass({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
componentDidMount: function() {
|
// TODO: [REACT-WARNING] Move this to constructor
|
||||||
|
UNSAFE_componentWillMount: function() {
|
||||||
this._mounted = true;
|
this._mounted = true;
|
||||||
const cli = MatrixClientPeg.get();
|
const cli = MatrixClientPeg.get();
|
||||||
if (cli.hasLazyLoadMembersEnabled()) {
|
if (cli.hasLazyLoadMembersEnabled()) {
|
||||||
|
|
|
@ -34,7 +34,8 @@ export default createReactClass({
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
componentDidMount: function() {
|
// TODO: [REACT-WARNING] Move this to constructor
|
||||||
|
UNSAFE_componentWillMount: function() {
|
||||||
const room = this.props.room;
|
const room = this.props.room;
|
||||||
const name = room.currentState.getStateEvents('m.room.name', '');
|
const name = room.currentState.getStateEvents('m.room.name', '');
|
||||||
const myId = MatrixClientPeg.get().credentials.userId;
|
const myId = MatrixClientPeg.get().credentials.userId;
|
||||||
|
|
Loading…
Reference in a new issue