diff --git a/lib/timeline-window.js b/lib/timeline-window.js index 1889631ae..742634313 100644 --- a/lib/timeline-window.js +++ b/lib/timeline-window.js @@ -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); } @@ -287,15 +287,13 @@ TimelineWindow.prototype.paginate = function(direction, size, makeRequest, /** - * Trim the window to the windowlimit + * Remove `delta` events from the start or end of the timeline. * * @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