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 #58 from matrix-org/rav/yet_more_scroll_fixes
Browse files Browse the repository at this point in the history
Fix issue with rooms not scrolling down when new events arrive
  • Loading branch information
richvdh committed Dec 17, 2015
2 parents 498990b + 3ff19dc commit 6ee0c72
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/components/structures/RoomView.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,7 @@ module.exports = React.createClass({

if (this.state.searchResults) return;

if (this.needsScrollReset) {
if (DEBUG_SCROLL) console.log("Resetting scroll position after tile count change");
this._restoreSavedScrollState();
this.needsScrollReset = false;
}
this._restoreSavedScrollState();

// have to fill space in case we're accepting an invite
if (!this.state.paginating) this.fillSpace();
Expand Down Expand Up @@ -683,10 +679,6 @@ module.exports = React.createClass({
}
++count;
}
if (count != this.lastEventTileCount) {
if (DEBUG_SCROLL) console.log("Queuing scroll reset (event count changed; now "+count+"; was "+this.lastEventTileCount+")");
this.needsScrollReset = true;
}
this.lastEventTileCount = count;
return ret;
},
Expand Down

0 comments on commit 6ee0c72

Please sign in to comment.