From 8ecf70dda0fbbaf21e07a9c10edc2aab0c685872 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Wed, 9 Dec 2015 13:24:15 +0000 Subject: [PATCH] show images with unknown height - fixes issue 475 hopefully --- src/components/views/elements/ImageView.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/views/elements/ImageView.js b/src/components/views/elements/ImageView.js index 2025cec2..741524be 100644 --- a/src/components/views/elements/ImageView.js +++ b/src/components/views/elements/ImageView.js @@ -105,6 +105,11 @@ module.exports = React.createClass({ res = ", " + style.width + "x" + style.height + "px"; } + var size; + if (this.props.mxEvent.getContent().info && this.props.mxEvent.getContent().info.size) { + size = filesize(this.props.mxEvent.getContent().info.size); + } + return (
@@ -124,7 +129,7 @@ module.exports = React.createClass({
Download this file
- ({ filesize(this.props.mxEvent.getContent().info.size) }{ res }) + { size } { res }