From ab9690d3b0c8ec55778de151cdcd9a1ee2162771 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Mon, 15 Feb 2016 20:40:34 +0000 Subject: [PATCH] Don't re-tint on unmount Need to remember the 'ref' function is called on unmount too - we shouldn't retint back to the room colours at this point. --- src/components/structures/RoomView.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 76a79bec03..8687cb444c 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -1258,8 +1258,10 @@ module.exports = React.createClass({ var messagePanel = ( { - this.refs.messagePanel = r; + this.refs.messagePanel = r; + if(r) { this.updateTint(); + } }} room={this.state.room} hidden={hideMessagePanel}