You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Move LL filter creation inside MatrixClient
As we need an option to turn lazy loading on (we can't just accept a filter, as /messages has an incompatible filter), better only pass the option and create the filter inside startClient
This commit is contained in:
@@ -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.
|
||||
@@ -109,7 +101,6 @@ class MatrixClientPeg {
|
||||
|
||||
if (SettingsStore.isFeatureEnabled('feature_lazyloading')) {
|
||||
opts.lazyLoadMembers = true;
|
||||
opts.filter = await this.matrixClient.createFilter(FILTER_CONTENT);
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -128,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`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user