mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
Replace entry in contextEntryNotInTimeline
This commit is contained in:
parent
cfbb6d4250
commit
c6484f1eac
@ -224,11 +224,14 @@ export class Timeline {
|
||||
/** @package */
|
||||
replaceEntries(entries) {
|
||||
this._addLocalRelationsToNewRemoteEntries(entries);
|
||||
this._updateEntriesNotInTimeline(entries);
|
||||
this._loadContextEntriesWhereNeeded(entries);
|
||||
for (const entry of entries) {
|
||||
try {
|
||||
this._remoteEntries.getAndUpdate(entry, Timeline._entryUpdater);
|
||||
const oldEntry = this._contextEntriesNotInTimeline.get(entry.id)
|
||||
if (oldEntry) {
|
||||
Timeline._entryUpdater(oldEntry, entry);
|
||||
}
|
||||
this._contextEntriesNotInTimeline.set(entry.id, entry);
|
||||
// Since this entry changed, all dependent entries should be updated
|
||||
entry.contextForEntries?.forEach(e => this._updateEntry(e));
|
||||
} catch (err) {
|
||||
|
Loading…
Reference in New Issue
Block a user