mirror of
https://github.com/element-hq/element-web
synced 2024-11-29 04:48:50 +03:00
Merge branch 'poljar/file-panel-logging' into develop
This commit is contained in:
commit
097a34e58b
1 changed files with 11 additions and 5 deletions
|
@ -716,14 +716,20 @@ export default class EventIndex extends EventEmitter {
|
|||
}
|
||||
});
|
||||
|
||||
let ret = false;
|
||||
let paginationToken = "";
|
||||
|
||||
// Set the pagination token to the oldest event that we retrieved.
|
||||
if (matrixEvents.length > 0) {
|
||||
timeline.setPaginationToken(matrixEvents[matrixEvents.length - 1].getId(), EventTimeline.BACKWARDS);
|
||||
return true;
|
||||
} else {
|
||||
timeline.setPaginationToken("", EventTimeline.BACKWARDS);
|
||||
return false;
|
||||
paginationToken = matrixEvents[matrixEvents.length - 1].getId();
|
||||
ret = true;
|
||||
}
|
||||
|
||||
console.log("EventIndex: Populating file panel with", matrixEvents.length,
|
||||
"events and setting the pagination token to", paginationToken);
|
||||
|
||||
timeline.setPaginationToken(paginationToken, EventTimeline.BACKWARDS);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue