Clean up scrollToken assignment
This commit is contained in:
parent
d7576d223d
commit
8f5c739886
1 changed files with 3 additions and 6 deletions
|
@ -996,12 +996,9 @@ module.exports = React.createClass({
|
||||||
var eventId = mxEv.getId();
|
var eventId = mxEv.getId();
|
||||||
var highlight = (eventId == this.props.highlightedEventId);
|
var highlight = (eventId == this.props.highlightedEventId);
|
||||||
|
|
||||||
var scrollToken = eventId;
|
// we can't use local echoes as scroll tokens, because their event IDs change.
|
||||||
// we can't use local echoes as scroll tokens, because their event
|
// Local echos have a send "status".
|
||||||
// IDs change.
|
var scrollToken = mxEv.status ? undefined : eventId;
|
||||||
if (mxEv.status) {
|
|
||||||
scrollToken = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret.push(
|
ret.push(
|
||||||
<li key={eventId}
|
<li key={eventId}
|
||||||
|
|
Loading…
Reference in a new issue