message: Also only download images after clicking on them
diff: @@ -85,6 +85,7 @@ export default class MImageBody extends React.Component {
  showImage() {
  localStorage.setItem("mx_ShowImage_" + this.props.mxEvent.getId(), "true");
  this.setState({showImage: true});
  + this._downloadImage();
  }
  onClick(ev) {
  @@ -253,10 +254,7 @@ export default class MImageBody extends React.Component {
  }
  }
  - componentDidMount() {
  - this.unmounted = false;
  - this.context.on('sync', this.onClientSync);
  -
  + _downloadImage() {
  const content = this.props.mxEvent.getContent();
  if (content.file !== undefined && this.state.decryptedUrl === null) {
  let thumbnailPromise = Promise.resolve(null);
  @@ -289,9 +287,18 @@ export default class MImageBody extends React.Component {
  });
  });
  }
  + }
  +
  + componentDidMount() {
  + this.unmounted = false;
  + this.context.on('sync', this.onClientSync);
  +
  + const showImage = this.state.showImage ||
  + localStorage.getItem("mx_ShowImage_" + this.props.mxEvent.getId()) === "true";
  - // Remember that the user wanted to show this particular image
  - if (!this.state.showImage && localStorage.getItem("mx_ShowImage_" + this.props.mxEvent.getId()) === "true") {
  + if (showImage) {
  + // Don't download anything becaue we don't want to display anything.
  + this._downloadImage();
  this.setState({showImage: true});
  }
  