remove onChildResize in RoomView as it's unused

This commit is contained in:
Bruno Windels 2019-03-12 16:33:05 +01:00
parent 30d848b86e
commit f71a9f10dd
3 changed files with 2 additions and 22 deletions

View file

@ -1364,8 +1364,7 @@ module.exports = React.createClass({
const showBar = this.refs.messagePanel.canJumpToReadMarker(); const showBar = this.refs.messagePanel.canJumpToReadMarker();
if (this.state.showTopUnreadMessagesBar != showBar) { if (this.state.showTopUnreadMessagesBar != showBar) {
this.setState({showTopUnreadMessagesBar: showBar}, this.setState({showTopUnreadMessagesBar: showBar});
this.onChildResize);
} }
}, },
@ -1408,7 +1407,7 @@ module.exports = React.createClass({
}; };
}, },
onResize: function(e) { onResize: function() {
// It seems flexbox doesn't give us a way to constrain the auxPanel height to have // It seems flexbox doesn't give us a way to constrain the auxPanel height to have
// a minimum of the height of the video element, whilst also capping it from pushing out the page // a minimum of the height of the video element, whilst also capping it from pushing out the page
// so we have to do it via JS instead. In this implementation we cap the height by putting // so we have to do it via JS instead. In this implementation we cap the height by putting
@ -1426,9 +1425,6 @@ module.exports = React.createClass({
if (auxPanelMaxHeight < 50) auxPanelMaxHeight = 50; if (auxPanelMaxHeight < 50) auxPanelMaxHeight = 50;
this.setState({auxPanelMaxHeight: auxPanelMaxHeight}); this.setState({auxPanelMaxHeight: auxPanelMaxHeight});
// changing the maxHeight on the auxpanel will trigger a callback go
// onChildResize, so no need to worry about that here.
}, },
onFullscreenClick: function() { onFullscreenClick: function() {
@ -1458,10 +1454,6 @@ module.exports = React.createClass({
this.forceUpdate(); // TODO: just update the voip buttons this.forceUpdate(); // TODO: just update the voip buttons
}, },
onChildResize: function() {
// no longer anything to do here
},
onStatusBarVisible: function() { onStatusBarVisible: function() {
if (this.unmounted) return; if (this.unmounted) return;
this.setState({ this.setState({
@ -1654,7 +1646,6 @@ module.exports = React.createClass({
isPeeking={myMembership !== "join"} isPeeking={myMembership !== "join"}
onInviteClick={this.onInviteButtonClick} onInviteClick={this.onInviteButtonClick}
onStopWarningClick={this.onStopAloneWarningClick} onStopWarningClick={this.onStopAloneWarningClick}
onResize={this.onChildResize}
onVisible={this.onStatusBarVisible} onVisible={this.onStatusBarVisible}
onHidden={this.onStatusBarHidden} onHidden={this.onStatusBarHidden}
/>; />;
@ -1723,7 +1714,6 @@ module.exports = React.createClass({
draggingFile={this.state.draggingFile} draggingFile={this.state.draggingFile}
displayConfCallNotification={this.state.displayConfCallNotification} displayConfCallNotification={this.state.displayConfCallNotification}
maxHeight={this.state.auxPanelMaxHeight} maxHeight={this.state.auxPanelMaxHeight}
onResize={this.onChildResize}
showApps={this.state.showApps} showApps={this.state.showApps}
hideAppsDrawer={false} > hideAppsDrawer={false} >
{ aux } { aux }
@ -1739,7 +1729,6 @@ module.exports = React.createClass({
messageComposer = messageComposer =
<MessageComposer <MessageComposer
room={this.state.room} room={this.state.room}
onResize={this.onChildResize}
uploadFile={this.uploadFile} uploadFile={this.uploadFile}
callState={this.state.callState} callState={this.state.callState}
disabled={this.props.disabled} disabled={this.props.disabled}

View file

@ -412,7 +412,6 @@ export default class MessageComposer extends React.Component {
<MessageComposerInput <MessageComposerInput
ref={(c) => this.messageComposerInput = c} ref={(c) => this.messageComposerInput = c}
key="controls_input" key="controls_input"
onResize={this.props.onResize}
room={this.props.room} room={this.props.room}
placeholder={placeholderText} placeholder={placeholderText}
onFilesPasted={this.uploadFiles} onFilesPasted={this.uploadFiles}
@ -505,10 +504,6 @@ export default class MessageComposer extends React.Component {
} }
MessageComposer.propTypes = { MessageComposer.propTypes = {
// a callback which is called when the height of the composer is
// changed due to a change in content.
onResize: PropTypes.func,
// js-sdk Room object // js-sdk Room object
room: PropTypes.object.isRequired, room: PropTypes.object.isRequired,

View file

@ -135,10 +135,6 @@ function rangeEquals(a: Range, b: Range): boolean {
*/ */
export default class MessageComposerInput extends React.Component { export default class MessageComposerInput extends React.Component {
static propTypes = { static propTypes = {
// a callback which is called when the height of the composer is
// changed due to a change in content.
onResize: PropTypes.func,
// js-sdk Room object // js-sdk Room object
room: PropTypes.object.isRequired, room: PropTypes.object.isRequired,