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

Commit

Permalink
Merge pull request #55 from matrix-org/rav/codedup
Browse files Browse the repository at this point in the history
use RoomView.ScrollToBottom instead of reimplementing it
  • Loading branch information
richvdh committed Dec 16, 2015
2 parents 8aaef34 + f24b7ba commit 524563d
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/components/structures/RoomView.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,7 @@ module.exports = React.createClass({
// Call state has changed so we may be loading video elements
// which will obscure the message log.
// scroll to bottom
var scrollNode = this._getScrollNode();
if (scrollNode) {
scrollNode.scrollTop = scrollNode.scrollHeight;
}
this.scrollToBottom();
callState = call.call_state;
}
else {
Expand Down Expand Up @@ -287,12 +284,8 @@ module.exports = React.createClass({
messagePanel.addEventListener('dragleave', this.onDragLeaveOrEnd);
messagePanel.addEventListener('dragend', this.onDragLeaveOrEnd);

var messageWrapperScroll = this._getScrollNode();

messageWrapperScroll.scrollTop = messageWrapperScroll.scrollHeight;

this.scrollToBottom();
this.sendReadReceipt();

this.fillSpace();
}

Expand Down

0 comments on commit 524563d

Please sign in to comment.