Fix off-by-one error in read-marker advancing

The fix to https://github.com/vector-im/vector-web/issues/1241 introduced an
off-by-one error which meant we would show the RM before the last event in a
room. We were actually winding the RM back one if the last message wasn't sent
by us.
This commit is contained in:
Richard van der Hoff 2016-03-23 09:49:22 +00:00
parent 272bef1606
commit 04c9924ad6

View File

@ -392,7 +392,7 @@ var TimelinePanel = React.createClass({
// now think about advancing it
var myUserId = MatrixClientPeg.get().credentials.userId;
for (; i < events.length; i++) {
for (i++; i < events.length; i++) {
var ev = events[i];
if (!ev.sender || ev.sender.userId != myUserId) {
break;