Merge pull request #81 from matrix-org/green_line

Add self read-up-to marker
pull/21833/head
David Baker 2016-01-07 11:40:02 +00:00
commit dc2e395878
1 changed files with 5 additions and 0 deletions

View File

@ -650,6 +650,7 @@ module.exports = React.createClass({
var prevEvent = null; // the last event we showed
var readReceiptEventId = this.state.room.getEventReadUpTo(MatrixClientPeg.get().credentials.userId);
var startIdx = Math.max(0, this.state.room.timeline.length - this.state.messageCap);
for (var i = startIdx; i < this.state.room.timeline.length; i++) {
var mxEv = this.state.room.timeline[i];
@ -700,6 +701,10 @@ module.exports = React.createClass({
</li>
);
if (eventId == readReceiptEventId) {
ret.push(<hr className="mx_RoomView_myReadMarker" />);
}
prevEvent = mxEv;
}