1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-01 04:43:29 +03:00

only call setEventMetadata on unfiltered timelineSets

This commit is contained in:
Matthew Hodgson
2016-09-09 17:42:24 +01:00
parent bd32ed5598
commit bd9e3e5794

View File

@@ -234,6 +234,11 @@ EventTimeline.prototype.setNeighbouringTimeline = function(neighbour, direction)
EventTimeline.prototype.addEvent = function(event, atStart) { EventTimeline.prototype.addEvent = function(event, atStart) {
var stateContext = atStart ? this._startState : this._endState; var stateContext = atStart ? this._startState : this._endState;
// only call setEventMetadata on the unfiltered timelineSets
var timelineSet = this.getTimelineSet();
if (timelineSet.room &&
timelineSet.room.getUnfilteredTimelineSet() === timelineSet)
{
EventTimeline.setEventMetadata(event, stateContext, atStart); EventTimeline.setEventMetadata(event, stateContext, atStart);
// modify state // modify state
@@ -253,6 +258,7 @@ EventTimeline.prototype.addEvent = function(event, atStart) {
EventTimeline.setEventMetadata(event, stateContext, atStart); EventTimeline.setEventMetadata(event, stateContext, atStart);
} }
} }
}
var insertIndex; var insertIndex;