Restore earlier name
This commit is contained in:
parent
ed88184757
commit
2f4c0623d0
4 changed files with 8 additions and 8 deletions
|
@ -125,7 +125,7 @@ export class Timeline {
|
|||
clock: this._clock, redactingEntry
|
||||
});
|
||||
this._loadContextEntriesWhereNeeded([pee]);
|
||||
this._applyAndEmitLocalRelationChange(pee, target => target.addRelation(pee));
|
||||
this._applyAndEmitLocalRelationChange(pee, target => target.addLocalRelation(pee));
|
||||
return pee;
|
||||
}
|
||||
|
||||
|
@ -204,12 +204,12 @@ export class Timeline {
|
|||
if (pee.relatedEventId) {
|
||||
const relationTarget = entries.find(e => e.id === pee.relatedEventId);
|
||||
// no need to emit here as this entry is about to be added
|
||||
relationTarget?.addRelation(pee);
|
||||
relationTarget?.addLocalRelation(pee);
|
||||
}
|
||||
if (pee.redactingEntry) {
|
||||
const eventId = pee.redactingEntry.relatedEventId;
|
||||
const relationTarget = entries.find(e => e.id === eventId);
|
||||
relationTarget?.addRelation(pee);
|
||||
relationTarget?.addLocalRelation(pee);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -275,7 +275,7 @@ export class Timeline {
|
|||
*/
|
||||
for (const entry of entries) {
|
||||
const relatedEntry = this._contextEntriesNotInTimeline.get(entry.relatedEventId);
|
||||
if (relatedEntry?.isNonPersisted && relatedEntry?.addRelation(entry)) {
|
||||
if (relatedEntry?.isNonPersisted && relatedEntry?.addLocalRelation(entry)) {
|
||||
// update other entries for which this entry is a context entry
|
||||
relatedEntry.contextForEntries?.forEach(e => {
|
||||
this._remoteEntries.findAndUpdate(te => te.id === e.id, () => "contextEntry");
|
||||
|
|
|
@ -81,7 +81,7 @@ export class BaseEventEntry extends BaseEntry {
|
|||
- to mark this entry as being redacted in Timeline._updateEntriesFetchedFromHomeserver
|
||||
@return [string] returns the name of the field that has changed, if any
|
||||
*/
|
||||
addRelation(entry) {
|
||||
addLocalRelation(entry) {
|
||||
if (entry.eventType === REDACTION_TYPE && entry.isRelatedToId(this.id)) {
|
||||
if (!this._pendingRedactions) {
|
||||
this._pendingRedactions = [];
|
||||
|
|
|
@ -180,7 +180,7 @@ export function tests() {
|
|||
|
||||
function addPendingReaction(target, key) {
|
||||
queueIndex += 1;
|
||||
target.addRelation(new PendingEventEntry({
|
||||
target.addLocalRelation(new PendingEventEntry({
|
||||
pendingEvent: new PendingEvent({data: {
|
||||
eventType: "m.reaction",
|
||||
content: createAnnotation(target.id, key),
|
||||
|
@ -202,7 +202,7 @@ export function tests() {
|
|||
});
|
||||
}
|
||||
queueIndex += 1;
|
||||
target.addRelation(new PendingEventEntry({
|
||||
target.addLocalRelation(new PendingEventEntry({
|
||||
pendingEvent: new PendingEvent({data: {
|
||||
eventType: "m.room.redaction",
|
||||
relatedTxnId: pendingReaction ? pendingReaction.id : null,
|
||||
|
|
|
@ -134,6 +134,6 @@ export class FragmentBoundaryEntry extends BaseEntry {
|
|||
return new FragmentBoundaryEntry(neighbour, !this._isFragmentStart, this._fragmentIdComparer);
|
||||
}
|
||||
|
||||
addRelation() {}
|
||||
addLocalRelation() {}
|
||||
removeLocalRelation() {}
|
||||
}
|
||||
|
|
Reference in a new issue