hide lazy loading behind feature flag

pull/21833/head
Bruno Windels 2018-07-16 15:07:53 +02:00
parent 866b4bb067
commit af07d73432
3 changed files with 13 additions and 2 deletions

View File

@ -107,7 +107,9 @@ class MatrixClientPeg {
// the react sdk doesn't work without this, so don't allow
opts.pendingEventOrdering = "detached";
opts.filter = await this.matrixClient.createFilter(FILTER_CONTENT);
if (SettingsStore.isFeatureEnabled('feature_lazyloading')) {
opts.filter = await this.matrixClient.createFilter(FILTER_CONTENT);
}
try {
const promise = this.matrixClient.store.startup();

View File

@ -314,7 +314,11 @@ module.exports = React.createClass({
this.setState({isPeeking: false});
//viewing a previously joined room, try to lazy load members
MatrixClientPeg.get().loadRoomMembersIfNeeded(room.roomId);
// lazy load members if enabled
if (SettingsStore.isFeatureEnabled('feature_lazyloading')) {
MatrixClientPeg.get().loadRoomMembersIfNeeded(room.roomId);
}
}
}
},

View File

@ -83,6 +83,11 @@ export const SETTINGS = {
supportedLevels: LEVELS_FEATURE,
default: false,
},
"feature_lazyloading": {
isFeature: true,
displayName: _td("Increase performance by loading room members on first view"),
supportedLevels: LEVELS_FEATURE,
},
"MessageComposerInput.dontSuggestEmoji": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
displayName: _td('Disable Emoji suggestions while typing'),