Don't forceUpdate the message panel on resize
We don't really need to forceUpdate() the entire timeline panel every time something might resize it. It is sufficient to forceUpdate the ScrollPanel.
This commit is contained in:
parent
f41c0d9bbf
commit
b45c256427
3 changed files with 20 additions and 1 deletions
|
@ -159,6 +159,18 @@ module.exports = React.createClass({
|
|||
}
|
||||
},
|
||||
|
||||
// makes the MessagePanel update itself after it is resized (due to other
|
||||
// changes in the DOM)
|
||||
onResize: function() {
|
||||
if (!this.refs.scrollPanel) { return; }
|
||||
|
||||
// we don't need to forceUpdate ourselves here, but we do need to
|
||||
// forceUpdate the scrollpanel, which will make the gemini panel update
|
||||
// itself and trigger a scroll position check.
|
||||
console.log("MessagePanel.onResize");
|
||||
this.refs.scrollPanel.forceUpdate();
|
||||
},
|
||||
|
||||
_getEventTiles: function() {
|
||||
var EventTile = sdk.getComponent('rooms.EventTile');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue