mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
Rename methods
This commit is contained in:
parent
a060d54468
commit
8ec75ce4bb
@ -223,7 +223,7 @@ export class Timeline {
|
|||||||
/** @package */
|
/** @package */
|
||||||
replaceEntries(entries) {
|
replaceEntries(entries) {
|
||||||
this._addLocalRelationsToNewRemoteEntries(entries);
|
this._addLocalRelationsToNewRemoteEntries(entries);
|
||||||
this._updateFetchedEntries(entries);
|
this._updateEntriesNotInTimeline(entries);
|
||||||
this._loadRelatedEvents(entries);
|
this._loadRelatedEvents(entries);
|
||||||
for (const entry of entries) {
|
for (const entry of entries) {
|
||||||
try {
|
try {
|
||||||
@ -250,18 +250,18 @@ export class Timeline {
|
|||||||
/** @package */
|
/** @package */
|
||||||
addEntries(newEntries) {
|
addEntries(newEntries) {
|
||||||
this._addLocalRelationsToNewRemoteEntries(newEntries);
|
this._addLocalRelationsToNewRemoteEntries(newEntries);
|
||||||
this._updateFetchedEntries(newEntries);
|
this._updateEntriesNotInTimeline(newEntries);
|
||||||
this._moveFetchedEntryToRemoteEntries(newEntries);
|
this._moveEntryToRemoteEntries(newEntries);
|
||||||
this._remoteEntries.setManySorted(newEntries);
|
this._remoteEntries.setManySorted(newEntries);
|
||||||
this._loadRelatedEvents(newEntries);
|
this._loadRelatedEvents(newEntries);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update entries based on newly received events.
|
* 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.
|
* 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) {
|
for (const entry of entries) {
|
||||||
const relatedEntry = this._contextEntriesNotInTimeline.get(entry.relatedEventId);
|
const relatedEntry = this._contextEntriesNotInTimeline.get(entry.relatedEventId);
|
||||||
if (!relatedEntry) {
|
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),
|
* 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
|
* remove the event from _contextEntriesNotInTimeline since it is now in remoteEntries
|
||||||
*/
|
*/
|
||||||
_moveFetchedEntryToRemoteEntries(entries) {
|
_moveEntryToRemoteEntries(entries) {
|
||||||
for (const entry of entries) {
|
for (const entry of entries) {
|
||||||
const fetchedEntry = this._contextEntriesNotInTimeline.get(entry.id);
|
const fetchedEntry = this._contextEntriesNotInTimeline.get(entry.id);
|
||||||
if (fetchedEntry) {
|
if (fetchedEntry) {
|
||||||
|
Loading…
Reference in New Issue
Block a user