You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Make the scrollpanel update itself correctly on video resize.
When we first get video, the video component will resize itself. This will cause the page to be reflowed, but that doesn't trigger an update on the gemini scrollbar. We therefore need to force an update on the messagepanel. Implement this by providing an onResize property on the CallView component. We need to do the same when we change the maxHeight on the video panel. The same applies to resizing of the MessageComposer. That was previously handled with a fugly roomView.forceUpdate() from MessageComposer - make it use the same mechanism. Finally: the messageComposer is at least 70 pixels, and up to 100 pixels high - not 36. Fix the auxPanelMaxHeight calculation - and use a static constant rather than hardcoding the number to avoid this happening again.
This commit is contained in:
committed by
review.rocks
parent
e7740cbc8b
commit
243b2e4587
@@ -33,6 +33,12 @@ var MatrixClientPeg = require("../../../MatrixClientPeg");
|
||||
module.exports = React.createClass({
|
||||
displayName: 'CallView',
|
||||
|
||||
propTypes: {
|
||||
// a callback which is called when the video within the callview
|
||||
// due to a change in video metadata
|
||||
onResize: React.PropTypes.function,
|
||||
},
|
||||
|
||||
componentDidMount: function() {
|
||||
this.dispatcherRef = dis.register(this.onAction);
|
||||
if (this.props.room) {
|
||||
@@ -97,7 +103,7 @@ module.exports = React.createClass({
|
||||
render: function(){
|
||||
var VideoView = sdk.getComponent('voip.VideoView');
|
||||
return (
|
||||
<VideoView ref="video" onClick={ this.props.onClick }/>
|
||||
<VideoView ref="video" onClick={ this.props.onClick } onResize={ this.props.onResize }/>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user