From d924dbb7235c7ff4e30f0d6cc73750ce5bad9f3c Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Mon, 13 Dec 2021 12:12:58 +0530 Subject: [PATCH] Add explaining comment --- src/matrix/room/timeline/Timeline.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/matrix/room/timeline/Timeline.js b/src/matrix/room/timeline/Timeline.js index 71f532bb..f58e7b83 100644 --- a/src/matrix/room/timeline/Timeline.js +++ b/src/matrix/room/timeline/Timeline.js @@ -256,8 +256,10 @@ export class Timeline { } _updateFetchedEntries(entries) { + // Update fetchedEntries based on incoming event, eg: a fetched event being redacted for (const entry of entries) { const relatedEntry = this._fetchedEventEntries.get(entry.relatedEventId); + // todo: can this be called .addRelation instead? if (relatedEntry?.addLocalRelation(entry)) { relatedEntry.dependents.forEach(e => this._updateEntry(e)); }