remove obsolete comments

This commit is contained in:
Bruno Windels 2021-05-31 16:23:59 +02:00
parent 25ce06c9d5
commit 13a4a0169c

View File

@ -103,7 +103,6 @@ export class Timeline {
}, pee => { }, pee => {
this._applyAndEmitLocalRelationChange(pee.pendingEvent, target => target.removeLocalRelation(pee)); this._applyAndEmitLocalRelationChange(pee.pendingEvent, target => target.removeLocalRelation(pee));
}); });
// we need a hook for when a pee is removed, so we can remove the local relation
} else { } else {
this._localEntries = new ObservableArray(); this._localEntries = new ObservableArray();
} }
@ -122,8 +121,6 @@ export class Timeline {
); );
// now look in remote entries based on event id // now look in remote entries based on event id
if (!foundInLocalEntries && pe.relatedEventId) { if (!foundInLocalEntries && pe.relatedEventId) {
// TODO: ideally iterate in reverse as target is likely to be most recent,
// but not easy through ObservableList contract
this._remoteEntries.findAndUpdate( this._remoteEntries.findAndUpdate(
e => e.id === pe.relatedEventId, e => e.id === pe.relatedEventId,
updateOrFalse updateOrFalse
@ -137,8 +134,6 @@ export class Timeline {
replaceEntries(entries) { replaceEntries(entries) {
for (const entry of entries) { for (const entry of entries) {
// this will use the comparator and thus
// check for equality using the compare method in BaseEntry
this._remoteEntries.update(entry, null, previousEntry => { this._remoteEntries.update(entry, null, previousEntry => {
entry.transferLocalEchoState(previousEntry); entry.transferLocalEchoState(previousEntry);
}); });