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

Commit

Permalink
In practice the MELS-1,2,3 solves nothing, revert it
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Barnard committed Feb 22, 2017
1 parent 6fead66 commit f92708f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/components/structures/MessagePanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ module.exports = React.createClass({
this.eventNodes = {};

var i;
let melsIndex = 0;

// first figure out which is the last event in the list which we're
// actually going to show; this allows us to behave slightly
Expand Down Expand Up @@ -303,10 +302,10 @@ module.exports = React.createClass({
// instead will allow new props to be provided. In turn, the shouldComponentUpdate
// method on MELS can be used to prevent unnecessary renderings.
//
// melsIndex is deliberately unrelated to the contained events so that pagination
// will not cause it to be recreated.
const key = "membereventlistsummary-" + melsIndex;
melsIndex++;
// Whilst back-paginating with a MELS at the top of the panel, prevEvent will be null,
// so use the key "membereventlistsummary-initial". Otherwise, use the ID of the first
// membership event, which will not change during forward pagination.
const key = "membereventlistsummary-" + (prevEvent ? mxEv.getId() : "initial");

if (this._wantsDateSeparator(prevEvent, mxEv.getDate())) {
let dateSeparator = <li key={ts1+'~'}><DateSeparator key={ts1+'~'} ts={ts1}/></li>;
Expand Down

0 comments on commit f92708f

Please sign in to comment.