Add date seperator to the expanded events

netsplits across midnight is not handled, and @richvdh suggested splitting the list in two
This commit is contained in:
Luke Barnard 2016-11-09 17:44:43 +00:00
parent 04a934f738
commit 5f0b891d47
2 changed files with 7 additions and 8 deletions

View file

@ -31,6 +31,7 @@ module.exports = React.createClass({
threshold: React.PropTypes.number,
// The function to render events if they are not being summarised
renderEvents: React.PropTypes.function,
previousEvent: React.PropTypes.object,
},
getInitialState: function() {
@ -190,7 +191,7 @@ module.exports = React.createClass({
let expandedEvents = null;
if (expanded) {
expandedEvents = this.props.renderEvents(eventsToRender);
expandedEvents = this.props.renderEvents(this.props.previousEvent, eventsToRender);
}
let avatars = this.renderAvatars(joinEvents.concat(leaveEvents));