Merge branch 'develop' into foldleft/better-errors

This commit is contained in:
Zoe 2020-04-06 11:36:46 +01:00
commit 5ef06357f6
307 changed files with 2986 additions and 1615 deletions

View file

@ -170,6 +170,7 @@ export default createReactClass({
return MatrixClientPeg.get().mxcUrlToHttp(content.url);
},
// TODO: [REACT-WARNING] Replace component with real class, use constructor for refs
UNSAFE_componentWillMount: function() {
this._iframe = createRef();
this._dummyLink = createRef();

View file

@ -67,11 +67,6 @@ export default class MImageBody extends React.Component {
this._image = createRef();
}
componentWillMount() {
this.unmounted = false;
this.context.on('sync', this.onClientSync);
}
// FIXME: factor this out and aplpy it to MVideoBody and MAudioBody too!
onClientSync(syncState, prevState) {
if (this.unmounted) return;
@ -258,6 +253,9 @@ export default class MImageBody extends React.Component {
}
componentDidMount() {
this.unmounted = false;
this.context.on('sync', this.onClientSync);
const content = this.props.mxEvent.getContent();
if (content.file !== undefined && this.state.decryptedUrl === null) {
let thumbnailPromise = Promise.resolve(null);

View file

@ -47,6 +47,7 @@ export default createReactClass({
maxImageHeight: PropTypes.number,
},
// TODO: [REACT-WARNING] Replace component with real class, use constructor for refs
UNSAFE_componentWillMount: function() {
this._body = createRef();
},

View file

@ -42,7 +42,7 @@ export default createReactClass({
};
},
componentWillMount() {
componentDidMount() {
this.unmounted = false;
this._updateRelatedGroups();

View file

@ -86,6 +86,7 @@ export default createReactClass({
return successful;
},
// TODO: [REACT-WARNING] Replace component with real class, use constructor for refs
UNSAFE_componentWillMount: function() {
this._content = createRef();
},