From 04a934f73895032a680712c2ba342525afca8e79 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Wed, 9 Nov 2016 16:24:56 +0000 Subject: [PATCH] Trying to get rid of the date separator problem --- src/components/structures/MessagePanel.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/structures/MessagePanel.js b/src/components/structures/MessagePanel.js index 3b6547561e..3b0dbc03ac 100644 --- a/src/components/structures/MessagePanel.js +++ b/src/components/structures/MessagePanel.js @@ -294,8 +294,6 @@ module.exports = React.createClass({ // Wrap consecutive member events in a ListSummary if (isMembershipChange(mxEv)) { - // Prevent message continuations between truncations - prevEvent = null; let summarisedEvents = [mxEv]; i++; @@ -308,15 +306,15 @@ module.exports = React.createClass({ } summarisedEvents.push(collapsedMxEv); } - let ePrev = null; + let renderEvents = (events) => { if (events.length === 0) { return null; } return events.map( (e) => { - let ret = this._getTilesForEvent(ePrev, e); - ePrev = e; + // e, e to prevent date seperators + let ret = this._getTilesForEvent(e, e); return ret; } ).reduce((a,b) => a.concat(b)); @@ -327,6 +325,8 @@ module.exports = React.createClass({ renderEvents={renderEvents} /> ); + // Use the first member event to create scroll token + ret.push(
  • ); continue; }