Merge pull request #1909 from matrix-org/dbkr/fix_image_size_jump

Fix image size jumping regression
pull/21833/head
Luke Barnard 2018-05-17 16:56:51 +01:00 committed by GitHub
commit cc87b73de2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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();
} }
@ -207,6 +207,7 @@ export default class extends React.Component {
}); });
}).done(); }).done();
} }
this.fixupHeight();
this._afterComponentDidMount(); this._afterComponentDidMount();
} }

View File

@ -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',
}); });