increase/clear min-height on timeline on new message(s)

depending on whether the typing bar is visible
This commit is contained in:
Bruno Windels 2019-01-21 17:35:40 +01:00
parent 018f3d2a5c
commit 25aa58f29f
3 changed files with 27 additions and 4 deletions

View file

@ -640,6 +640,20 @@ module.exports = React.createClass({
}
},
updateTimelineMinHeight: function() {
const scrollPanel = this.refs.scrollPanel;
const whoIsTyping = this.refs.whoIsTyping;
const isTypingVisible = whoIsTyping && whoIsTyping.isVisible();
if (scrollPanel) {
if (isTypingVisible) {
scrollPanel.blockShrinking();
} else {
scrollPanel.clearBlockShrinking();
}
}
},
onResize: function() {
dis.dispatch({ action: 'timeline_resize' }, true);
},
@ -668,7 +682,7 @@ module.exports = React.createClass({
let whoIsTyping;
if (this.props.room) {
whoIsTyping = (<WhoIsTypingTile room={this.props.room} onVisible={this._onTypingVisible} />);
whoIsTyping = (<WhoIsTypingTile room={this.props.room} onVisible={this._onTypingVisible} ref="whoIsTyping" />);
}
return (