You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-16 22:01:54 +03:00
Merge branch 'poljar/seshat-filepanel' into develop
This commit is contained in:
@ -94,6 +94,10 @@ const TimelinePanel = createReactClass({
|
||||
// callback which is called when the read-up-to mark is updated.
|
||||
onReadMarkerUpdated: PropTypes.func,
|
||||
|
||||
// callback which is called when we wish to paginate the timeline
|
||||
// window.
|
||||
onPaginationRequest: PropTypes.func,
|
||||
|
||||
// maximum number of events to show in a timeline
|
||||
timelineCap: PropTypes.number,
|
||||
|
||||
@ -338,6 +342,14 @@ const TimelinePanel = createReactClass({
|
||||
}
|
||||
},
|
||||
|
||||
onPaginationRequest(timelineWindow, direction, size) {
|
||||
if (this.props.onPaginationRequest) {
|
||||
return this.props.onPaginationRequest(timelineWindow, direction, size);
|
||||
} else {
|
||||
return timelineWindow.paginate(direction, size);
|
||||
}
|
||||
},
|
||||
|
||||
// set off a pagination request.
|
||||
onMessageListFillRequest: function(backwards) {
|
||||
if (!this._shouldPaginate()) return Promise.resolve(false);
|
||||
@ -360,7 +372,7 @@ const TimelinePanel = createReactClass({
|
||||
debuglog("TimelinePanel: Initiating paginate; backwards:"+backwards);
|
||||
this.setState({[paginatingKey]: true});
|
||||
|
||||
return this._timelineWindow.paginate(dir, PAGINATE_SIZE).then((r) => {
|
||||
return this.onPaginationRequest(this._timelineWindow, dir, PAGINATE_SIZE).then((r) => {
|
||||
if (this.unmounted) { return; }
|
||||
|
||||
debuglog("TimelinePanel: paginate complete backwards:"+backwards+"; success:"+r);
|
||||
|
Reference in New Issue
Block a user