From 8ec75ce4bb2be2964d604dd97df11351b05eb949 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Wed, 15 Dec 2021 20:42:38 +0530 Subject: [PATCH] Rename methods --- src/matrix/room/timeline/Timeline.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/matrix/room/timeline/Timeline.js b/src/matrix/room/timeline/Timeline.js index c5f6d505..08f3c68b 100644 --- a/src/matrix/room/timeline/Timeline.js +++ b/src/matrix/room/timeline/Timeline.js @@ -223,7 +223,7 @@ export class Timeline { /** @package */ replaceEntries(entries) { this._addLocalRelationsToNewRemoteEntries(entries); - this._updateFetchedEntries(entries); + this._updateEntriesNotInTimeline(entries); this._loadRelatedEvents(entries); for (const entry of entries) { try { @@ -250,18 +250,18 @@ export class Timeline { /** @package */ addEntries(newEntries) { this._addLocalRelationsToNewRemoteEntries(newEntries); - this._updateFetchedEntries(newEntries); - this._moveFetchedEntryToRemoteEntries(newEntries); + this._updateEntriesNotInTimeline(newEntries); + this._moveEntryToRemoteEntries(newEntries); this._remoteEntries.setManySorted(newEntries); this._loadRelatedEvents(newEntries); } /** * Update entries based on newly received events. - * eg: a newly received redacted event may mark an existing event in contextEntriesNotInTimeline as being redacted + * eg: a newly received redaction event may mark an existing event in contextEntriesNotInTimeline as being redacted * This is only for the events that are not in the timeline but had to fetched from elsewhere to render reply previews. */ - _updateFetchedEntries(entries) { + _updateEntriesNotInTimeline(entries) { for (const entry of entries) { const relatedEntry = this._contextEntriesNotInTimeline.get(entry.relatedEventId); if (!relatedEntry) { @@ -292,7 +292,7 @@ export class Timeline { * If an event we had to fetch from hs/storage is now in the timeline (for eg, due to gap fill), * remove the event from _contextEntriesNotInTimeline since it is now in remoteEntries */ - _moveFetchedEntryToRemoteEntries(entries) { + _moveEntryToRemoteEntries(entries) { for (const entry of entries) { const fetchedEntry = this._contextEntriesNotInTimeline.get(entry.id); if (fetchedEntry) {