fix for loop - check happens before pre-inc so cause issues at end of TL
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
c9b547368b
commit
8e66e64621
1 changed files with 1 additions and 1 deletions
|
@ -1023,7 +1023,7 @@ var TimelinePanel = React.createClass({
|
||||||
let latestReadEventIndex = i;
|
let latestReadEventIndex = i;
|
||||||
// Place the RM at a hidden event below the latest seen event (if exists)
|
// Place the RM at a hidden event below the latest seen event (if exists)
|
||||||
// to prevent RM going up the timeline between clients which do not hide the same events.
|
// to prevent RM going up the timeline between clients which do not hide the same events.
|
||||||
for (let j = i; j < this.state.events.length; ++j) {
|
for (let j = i + 1; j < this.state.events.length; j++) {
|
||||||
if (messagePanel._shouldShowEvent(this.state.events[j])) break;
|
if (messagePanel._shouldShowEvent(this.state.events[j])) break;
|
||||||
latestReadEventIndex = j;
|
latestReadEventIndex = j;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue