You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-29 16:43:09 +03:00
initial PR fixes
This commit is contained in:
@@ -223,10 +223,10 @@ Room.prototype._fixUpLegacyTimelineFields = function() {
|
||||
// and this.oldState and this.currentState as references to the
|
||||
// state at the start and end of that timeline. These are more
|
||||
// for backwards-compatibility than anything else.
|
||||
this.timeline = this.getUnfilteredTimelineSet().getLiveTimeline().getEvents();
|
||||
this.oldState = this.getUnfilteredTimelineSet().getLiveTimeline()
|
||||
this.timeline = this.getLiveTimeline().getEvents();
|
||||
this.oldState = this.getLiveTimeline()
|
||||
.getState(EventTimeline.BACKWARDS);
|
||||
this.currentState = this.getUnfilteredTimelineSet().getLiveTimeline()
|
||||
this.currentState = this.getLiveTimeline()
|
||||
.getState(EventTimeline.FORWARDS);
|
||||
};
|
||||
|
||||
@@ -477,7 +477,7 @@ Room.prototype.getOrCreateFilteredTimelineSet = function(filter) {
|
||||
// may have grown huge and so take a long time to filter.
|
||||
// see https://github.com/vector-im/vector-web/issues/2109
|
||||
|
||||
var unfilteredLiveTimeline = this.getUnfilteredTimelineSet().getLiveTimeline();
|
||||
var unfilteredLiveTimeline = this.getLiveTimeline();
|
||||
|
||||
unfilteredLiveTimeline.getEvents().forEach(function(event) {
|
||||
timelineSet.addLiveEvent(event);
|
||||
@@ -1358,3 +1358,15 @@ module.exports = Room;
|
||||
*
|
||||
* @param {EventStatus} oldStatus The previous event status.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fires whenever the live timeline in a room is reset.
|
||||
*
|
||||
* When we get a 'limited' sync (for example, after a network outage), we reset
|
||||
* the live timeline to be empty before adding the recent events to the new
|
||||
* timeline. This event is fired after the timeline is reset, and before the
|
||||
* new events are added.
|
||||
*
|
||||
* @event module:client~MatrixClient#"Room.timelineReset"
|
||||
* @param {Room} room The room whose live timeline was reset.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user