mirror of https://github.com/vector-im/riot-web
Elsify
parent
a719623bb9
commit
37d16db0f0
|
@ -338,15 +338,17 @@ export default class MImageBody extends React.Component {
|
||||||
// By doing this, the image "pops" into the timeline, but is still restricted
|
// By doing this, the image "pops" into the timeline, but is still restricted
|
||||||
// by the same width and height logic below.
|
// by the same width and height logic below.
|
||||||
if (!this.state.loadedImageDimensions) {
|
if (!this.state.loadedImageDimensions) {
|
||||||
let imageElement = (
|
let imageElement;
|
||||||
<img style={{display: 'none'}} src={thumbUrl} ref="image"
|
|
||||||
alt={content.body}
|
|
||||||
onError={this.onImageError}
|
|
||||||
onLoad={this.onImageLoad}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
if (!this.state.showImage) {
|
if (!this.state.showImage) {
|
||||||
imageElement = <HiddenImagePlaceholder />;
|
imageElement = <HiddenImagePlaceholder />;
|
||||||
|
} else {
|
||||||
|
imageElement = (
|
||||||
|
<img style={{display: 'none'}} src={thumbUrl} ref="image"
|
||||||
|
alt={content.body}
|
||||||
|
onError={this.onImageError}
|
||||||
|
onLoad={this.onImageLoad}
|
||||||
|
/>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return this.wrapImage(contentUrl, imageElement);
|
return this.wrapImage(contentUrl, imageElement);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue