From 8b730c0a5d7c1aa2db7ddf0227e0d7aa3fedddfb Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Jan 2016 16:38:09 +0000 Subject: [PATCH] PR feedback --- src/components/structures/RoomView.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 5df5a1044e..e1f8067146 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -75,7 +75,7 @@ module.exports = React.createClass({ syncState: MatrixClientPeg.get().getSyncState(), hasUnsentMessages: this._hasUnsentMessages(room), callState: null, - readReceiptEventId: room.getEventReadUpTo(MatrixClientPeg.get().credentials.userId), + readMarkerEventId: room.getEventReadUpTo(MatrixClientPeg.get().credentials.userId), readMarkerGhostEventId: undefined, } }, @@ -246,13 +246,13 @@ module.exports = React.createClass({ onRoomReceipt: function(receiptEvent, room) { if (room.roomId == this.props.roomId) { - var readReceiptEventId = this.state.room.getEventReadUpTo(MatrixClientPeg.get().credentials.userId); + var readMarkerEventId = this.state.room.getEventReadUpTo(MatrixClientPeg.get().credentials.userId); var readMarkerGhostEventId = this.state.readMarkerGhostEventId; - if (this.state.readReceiptEventId !== undefined && this.state.readReceiptEventId != readReceiptEventId) { - readMarkerGhostEventId = this.state.readReceiptEventId; + if (this.state.readMarkerEventId !== undefined && this.state.readMarkerEventId != readMarkerEventId) { + readMarkerGhostEventId = this.state.readMarkerEventId; } this.setState({ - readReceiptEventId: readReceiptEventId, + readMarkerEventId: readMarkerEventId, readMarkerGhostEventId: readMarkerGhostEventId, }); } @@ -683,7 +683,7 @@ module.exports = React.createClass({ } } - // now we've decided whether or not to show this messages, + // now we've decided whether or not to show this message, // add the read up to marker if appropriate // doing this here means we implicitly do not show the marker // if it's at the bottom @@ -692,7 +692,7 @@ module.exports = React.createClass({ // this is where we decide what messages we show so it's the only // place we know whether we're at the bottom or not. var self = this; - if (prevEvent && prevEvent.getId() == this.state.readReceiptEventId) { + if (prevEvent && prevEvent.getId() == this.state.readMarkerEventId) { var hr; hr = (
);