From 8e66e64621edeebb839fcba139cd05db5036b97a Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sat, 22 Jul 2017 13:15:32 +0100 Subject: [PATCH] fix for loop - check happens before pre-inc so cause issues at end of TL Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/structures/TimelinePanel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/TimelinePanel.js b/src/components/structures/TimelinePanel.js index b07b975b5e..a860ec123f 100644 --- a/src/components/structures/TimelinePanel.js +++ b/src/components/structures/TimelinePanel.js @@ -1023,7 +1023,7 @@ var TimelinePanel = React.createClass({ let latestReadEventIndex = i; // 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. - 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; latestReadEventIndex = j; }