From f9e753f57aa3b4b928d80be6f7cfc282eab54383 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Thu, 10 Mar 2016 15:55:03 +0000 Subject: [PATCH] Update the gemini panel when we show/hide the TopUnreadMessagesBar Showing/hiding the TopUnreadMessagesBar resizes the scrollpanel. Make sure that we update the gemini panel when this happens. (Fixes an intermittent bug wherein we could get stuck with a 'scroll to bottom' indicator after jumping to the bottom, with unread messages in the view) --- src/components/structures/RoomView.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 84ad8f595c..c3a07dd104 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -920,7 +920,10 @@ module.exports = React.createClass({ // screen. var showBar = (pos < 0); - this.setState({showTopUnreadMessagesBar: showBar}); + if (this.state.showTopUnreadMessagesBar != showBar) { + this.setState({showTopUnreadMessagesBar: showBar}, + this.onChildResize); + } }, // get the current scroll position of the room, so that it can be