unrevert most of the logic.

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2017-07-21 23:18:18 +01:00
parent 1fa4fe0b9a
commit 7e355f7cda
No known key found for this signature in database
GPG key ID: 0435A1D4BBD34D64
2 changed files with 2 additions and 13 deletions

View file

@ -306,14 +306,11 @@ module.exports = React.createClass({
for (i = 0; i < this.props.events.length; i++) {
let mxEv = this.props.events[i];
let wantTile = true;
let eventId = mxEv.getId();
let readMarkerInMels = false;
let last = (i === lastShownEventIndex);
if (!this._shouldShowEvent(mxEv)) {
wantTile = false;
}
const wantTile = this._shouldShowEvent(mxEv);
// Wrap consecutive member events in a ListSummary, ignore if redacted
if (isMembershipChange(mxEv) && wantTile) {
@ -392,7 +389,7 @@ module.exports = React.createClass({
continue;
}
if (EventTile.haveTileForEvent(mxEv)) {
if (wantTile) {
// make sure we unpack the array returned by _getTilesForEvent,
// otherwise react will auto-generate keys and we will end up
// replacing all of the DOM elements every time we paginate.