1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-19 10:22:30 +03:00

Make timeline-window _unpaginate public and remove _

This commit is contained in:
Luke Barnard
2016-11-15 13:27:42 +00:00
parent 909b56d48e
commit d8c0b16d7e

View File

@@ -234,7 +234,7 @@ TimelineWindow.prototype.paginate = function(direction, size, makeRequest,
// remove some events from the other end, if necessary
var excess = this._eventCount - this._windowLimit;
if (excess > 0) {
this._unpaginate(excess, direction != EventTimeline.BACKWARDS);
this.unpaginate(excess, direction != EventTimeline.BACKWARDS);
}
return q(true);
}
@@ -292,10 +292,8 @@ TimelineWindow.prototype.paginate = function(direction, size, makeRequest,
* @param {number} delta number of events to remove from the timeline
* @param {boolean} startOfTimeline if events should be removed from the start
* of the timeline.
*
* @private
*/
TimelineWindow.prototype._unpaginate = function(delta, startOfTimeline) {
TimelineWindow.prototype.unpaginate = function(delta, startOfTimeline) {
var tl = startOfTimeline ? this._start : this._end;
// sanity-check the delta