From e53497421e0d0a1974205821619676244ef28802 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 17 May 2018 16:47:17 +0100 Subject: [PATCH 1/4] Fix image size jumping regression Fixes https://github.com/vector-im/riot-web/issues/6654 --- src/components/views/messages/MImageBody.js | 3 ++- src/components/views/messages/MStickerBody.js | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/messages/MImageBody.js b/src/components/views/messages/MImageBody.js index 6cc492acf8..f59b3a9e2c 100644 --- a/src/components/views/messages/MImageBody.js +++ b/src/components/views/messages/MImageBody.js @@ -1,5 +1,6 @@ /* Copyright 2015, 2016 OpenMarket Ltd +Copyright 2018 New Vector Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -140,7 +141,6 @@ export default class extends React.Component { } onImageLoad() { - this.fixupHeight(); this.props.onWidgetLoad(); } @@ -208,6 +208,7 @@ export default class extends React.Component { }).done(); } this._afterComponentDidMount(); + this.fixupHeight(); } // To be overridden by subclasses (e.g. MStickerBody) for further diff --git a/src/components/views/messages/MStickerBody.js b/src/components/views/messages/MStickerBody.js index 3a412fc2e2..aaad5ba75e 100644 --- a/src/components/views/messages/MStickerBody.js +++ b/src/components/views/messages/MStickerBody.js @@ -40,7 +40,6 @@ export default class MStickerBody extends MImageBody { } _onImageLoad() { - this.fixupHeight(); this.setState({ placeholderClasses: 'mx_MStickerBody_placeholder_invisible', }); From a7006307bf3631824cd484d3b51cec6d8124ed9c Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 17 May 2018 16:50:16 +0100 Subject: [PATCH 2/4] Call afterComponentDidMount() after componentDidMount --- src/components/views/messages/MImageBody.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/messages/MImageBody.js b/src/components/views/messages/MImageBody.js index f59b3a9e2c..8045d43104 100644 --- a/src/components/views/messages/MImageBody.js +++ b/src/components/views/messages/MImageBody.js @@ -207,8 +207,8 @@ export default class extends React.Component { }); }).done(); } - this._afterComponentDidMount(); this.fixupHeight(); + this._afterComponentDidMount(); } // To be overridden by subclasses (e.g. MStickerBody) for further From 43dbf306b057f6415a3ab7bebcebdcbfd16e7ec0 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 17 May 2018 17:04:38 +0100 Subject: [PATCH 3/4] Prepare changelog for v0.12.5 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a20b902a6e..b161a9d908 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +Changes in [0.12.5](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.12.5) (2018-05-17) +===================================================================================================== +[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.12.4...v0.12.5) + + * Fix image size jumping regression + [\#1909](https://github.com/matrix-org/matrix-react-sdk/pull/1909) + Changes in [0.12.4](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.12.4) (2018-05-16) ===================================================================================================== [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.12.4-rc.6...v0.12.4) From fa7f6c2c4cd1c938e4365bd2380264b1245cc44f Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 17 May 2018 17:04:39 +0100 Subject: [PATCH 4/4] v0.12.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 60f65f4c39..6c34979c43 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-react-sdk", - "version": "0.12.4", + "version": "0.12.5", "description": "SDK for matrix.org using React", "author": "matrix.org", "repository": {