Merge pull request #2104 from matrix-org/bwindels/backpaginate_ll
Lazy loading: Lazy load members while backpaginating
This commit is contained in:
commit
27ee85f4d9
2 changed files with 5 additions and 10 deletions
|
@ -34,14 +34,6 @@ interface MatrixClientCreds {
|
|||
guest: boolean,
|
||||
}
|
||||
|
||||
const FILTER_CONTENT = {
|
||||
room: {
|
||||
state: {
|
||||
lazy_load_members: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Wrapper object for handling the js-sdk Matrix Client object in the react-sdk
|
||||
* Handles the creation/initialisation of client objects.
|
||||
|
@ -108,7 +100,7 @@ class MatrixClientPeg {
|
|||
opts.pendingEventOrdering = "detached";
|
||||
|
||||
if (SettingsStore.isFeatureEnabled('feature_lazyloading')) {
|
||||
opts.filter = await this.matrixClient.createFilter(FILTER_CONTENT);
|
||||
opts.lazyLoadMembers = true;
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -127,7 +119,7 @@ class MatrixClientPeg {
|
|||
MatrixActionCreators.start(this.matrixClient);
|
||||
|
||||
console.log(`MatrixClientPeg: really starting MatrixClient`);
|
||||
this.get().startClient(opts);
|
||||
await this.get().startClient(opts);
|
||||
console.log(`MatrixClientPeg: MatrixClient started`);
|
||||
}
|
||||
|
||||
|
|
|
@ -187,6 +187,9 @@ const Pill = React.createClass({
|
|||
getContent: () => {
|
||||
return {avatar_url: resp.avatar_url};
|
||||
},
|
||||
getDirectionalContent: function() {
|
||||
return this.getContent();
|
||||
},
|
||||
};
|
||||
this.setState({member});
|
||||
}).catch((err) => {
|
||||
|
|
Loading…
Reference in a new issue