From 581c8c138ea24bb483fdb4cdf5fe93cf37771e11 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Tue, 21 Feb 2017 15:01:18 +0000 Subject: [PATCH] Do not push a dummy element with a scroll token for invisible events If an event does not `wantTile`, do not add a dummy element with a scroll token, as this can be unperformant with 1000s of events. --- src/components/structures/MessagePanel.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/components/structures/MessagePanel.js b/src/components/structures/MessagePanel.js index dcebe38fa4..821cbc5744 100644 --- a/src/components/structures/MessagePanel.js +++ b/src/components/structures/MessagePanel.js @@ -362,10 +362,6 @@ module.exports = React.createClass({ // replacing all of the DOM elements every time we paginate. ret.push(...this._getTilesForEvent(prevEvent, mxEv, last)); prevEvent = mxEv; - } else if (!mxEv.status) { - // if we aren't showing the event, put in a dummy scroll token anyway, so - // that we can scroll to the right place. - ret.push(
  • ); } var isVisibleReadMarker = false;