Fix image size jumping regression
Fixes https://github.com/vector-im/riot-web/issues/6654pull/21833/head
parent
bf0ec249b6
commit
e53497421e
src/components/views/messages
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2015, 2016 OpenMarket Ltd
|
Copyright 2015, 2016 OpenMarket Ltd
|
||||||
|
Copyright 2018 New Vector Ltd
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
@ -140,7 +141,6 @@ export default class extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
onImageLoad() {
|
onImageLoad() {
|
||||||
this.fixupHeight();
|
|
||||||
this.props.onWidgetLoad();
|
this.props.onWidgetLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,6 +208,7 @@ export default class extends React.Component {
|
||||||
}).done();
|
}).done();
|
||||||
}
|
}
|
||||||
this._afterComponentDidMount();
|
this._afterComponentDidMount();
|
||||||
|
this.fixupHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
// To be overridden by subclasses (e.g. MStickerBody) for further
|
// To be overridden by subclasses (e.g. MStickerBody) for further
|
||||||
|
|
|
@ -40,7 +40,6 @@ export default class MStickerBody extends MImageBody {
|
||||||
}
|
}
|
||||||
|
|
||||||
_onImageLoad() {
|
_onImageLoad() {
|
||||||
this.fixupHeight();
|
|
||||||
this.setState({
|
this.setState({
|
||||||
placeholderClasses: 'mx_MStickerBody_placeholder_invisible',
|
placeholderClasses: 'mx_MStickerBody_placeholder_invisible',
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue