unrevert most of the logic.

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
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.

View File

@ -181,12 +181,6 @@ var TimelinePanel = React.createClass({
// always show timestamps on event tiles?
alwaysShowTimestamps: syncedSettings.alwaysShowTimestamps,
// hide redacted events as per old behaviour
hideRedactions: syncedSettings.hideRedactions,
// hide membership joins and leaves
hideJoinLeaves: syncedSettings.hideJoinLeaves,
};
},
@ -1125,8 +1119,6 @@ var TimelinePanel = React.createClass({
return (
<MessagePanel ref="messagePanel"
hidden={ this.props.hidden }
hideJoinLeaves={ this.state.hideJoinLeaves }
hideRedactions={ this.state.hideRedactions }
backPaginating={ this.state.backPaginating }
forwardPaginating={ forwardPaginating }
events={ this.state.events }