mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 12:28:50 +03:00
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 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(
|
||||
<li key={eventId}
|
||||
|
|
Loading…
Reference in a new issue