From 8f5c73988649d8251dba5cde3c8d8150f1b10b4c Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Thu, 4 Feb 2016 14:05:16 +0000 Subject: [PATCH] Clean up scrollToken assignment --- src/components/structures/RoomView.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 09b6baf2be..6e9835834a 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -996,12 +996,9 @@ module.exports = React.createClass({ var eventId = mxEv.getId(); var highlight = (eventId == this.props.highlightedEventId); - var scrollToken = eventId; - // we can't use local echoes as scroll tokens, because their event - // IDs change. - if (mxEv.status) { - scrollToken = undefined; - } + // we can't use local echoes as scroll tokens, because their event IDs change. + // Local echos have a send "status". + var scrollToken = mxEv.status ? undefined : eventId; ret.push(