Display sticker content (URL), rather than thumbnail.
parent
66ea78de65
commit
83412acbe7
|
@ -46,7 +46,7 @@ export default class MStickerBody extends MImageBody {
|
||||||
const hidePlaceholderTimer = setTimeout(() => {
|
const hidePlaceholderTimer = setTimeout(() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
placeholderVisible: false,
|
placeholderVisible: false,
|
||||||
thumbnailClasses: 'mx_MStickerBody_thumbnail_visible',
|
imageClasses: 'mx_MStickerBody_image_visible',
|
||||||
});
|
});
|
||||||
}, 500);
|
}, 500);
|
||||||
this.setState({hidePlaceholderTimer});
|
this.setState({hidePlaceholderTimer});
|
||||||
|
@ -58,14 +58,14 @@ export default class MStickerBody extends MImageBody {
|
||||||
this.setState({
|
this.setState({
|
||||||
placeholderVisible: false,
|
placeholderVisible: false,
|
||||||
placeholderClasses: '.mx_MStickerBody_placeholder_invisible',
|
placeholderClasses: '.mx_MStickerBody_placeholder_invisible',
|
||||||
thumbnailClasses: 'mx_MStickerBody_thumbnail_visible',
|
imageClasses: 'mx_MStickerBody_image_visible',
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// Image not already loaded
|
// Image not already loaded
|
||||||
this.setState({
|
this.setState({
|
||||||
placeholderVisible: true,
|
placeholderVisible: true,
|
||||||
placeholderClasses: '',
|
placeholderClasses: '',
|
||||||
thumbnailClasses: '',
|
imageClasses: '',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@ export default class MStickerBody extends MImageBody {
|
||||||
style={{
|
style={{
|
||||||
height: placeholderFixupHeight,
|
height: placeholderFixupHeight,
|
||||||
}}>
|
}}>
|
||||||
<div className={'mx_MStickerBody_thumbnail_container'}>
|
<div className={'mx_MStickerBody_image_container'}>
|
||||||
{ this.state.placeholderVisible &&
|
{ this.state.placeholderVisible &&
|
||||||
<div
|
<div
|
||||||
className={'mx_MStickerBody_placeholder ' + this.state.placeholderClasses}
|
className={'mx_MStickerBody_placeholder ' + this.state.placeholderClasses}
|
||||||
|
@ -125,8 +125,8 @@ export default class MStickerBody extends MImageBody {
|
||||||
height={placeholderSize} />
|
height={placeholderSize} />
|
||||||
</div> }
|
</div> }
|
||||||
<img
|
<img
|
||||||
className={'mx_MStickerBody_thumbnail ' + this.state.thumbnailClasses}
|
className={'mx_MStickerBody_image ' + this.state.imageClasses}
|
||||||
src={thumbUrl}
|
src={contentUrl}
|
||||||
ref='image'
|
ref='image'
|
||||||
alt={content.body}
|
alt={content.body}
|
||||||
onLoad={this.props.onWidgetLoad}
|
onLoad={this.props.onWidgetLoad}
|
||||||
|
|
Loading…
Reference in New Issue