Improve handling of animated GIF and WEBP images (#8153)

This commit is contained in:
Michael Telatynski 2022-03-25 16:31:40 +00:00 committed by GitHub
parent 50fd24581c
commit bc01efa124
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 297 additions and 126 deletions

View file

@ -41,14 +41,12 @@ export default class MImageReplyBody extends MImageBody {
}
render() {
if (this.state.error !== null) {
if (this.state.error) {
return super.render();
}
const content = this.props.mxEvent.getContent<IMediaEventContent>();
const contentUrl = this.getContentUrl();
const thumbnail = this.messageContent(contentUrl, this.getThumbUrl(), content, FORCED_IMAGE_HEIGHT);
const thumbnail = this.messageContent(this.state.contentUrl, this.state.thumbUrl, content, FORCED_IMAGE_HEIGHT);
const fileBody = this.getFileBody();
const sender = <SenderProfile
mxEvent={this.props.mxEvent}