Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
clear min-height on timeline resets and other occasions where we load it
Browse files Browse the repository at this point in the history
  • Loading branch information
bwindels committed Feb 26, 2019
1 parent 32f055b commit 8bb8ec1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/structures/MessagePanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,13 @@ module.exports = React.createClass({
}
},

clearTimelineHeight: function() {
const scrollPanel = this.refs.scrollPanel;
if (scrollPanel) {
scrollPanel.clearBlockShrinking();
}
},

onResize: function() {
dis.dispatch({ action: 'timeline_resize' }, true);
},
Expand Down
5 changes: 5 additions & 0 deletions src/components/structures/TimelinePanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,11 @@ var TimelinePanel = React.createClass({
{windowLimit: this.props.timelineCap});

const onLoaded = () => {
// clear the timeline min-height when
// (re)loading the timeline
if (this.refs.messagePanel) {
this.refs.messagePanel.clearTimelineHeight();
}
this._reloadEvents();

// If we switched away from the room while there were pending
Expand Down

0 comments on commit 8bb8ec1

Please sign in to comment.