mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:55:00 +08:00
Clean up scrollToken assignment
This commit is contained in:
parent
d7576d223d
commit
8f5c739886
@ -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 New Issue
Block a user