Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

remove ll feature flag, it's time! #2588

Merged
merged 5 commits into from
Feb 8, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions src/MatrixClientPeg.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,7 @@ class MatrixClientPeg {
const opts = utils.deepCopy(this.opts);
// the react sdk doesn't work without this, so don't allow
opts.pendingEventOrdering = "detached";

const LAZY_LOADING_FEATURE = "feature_lazyloading";
if (SettingsStore.isFeatureEnabled(LAZY_LOADING_FEATURE)) {
const userId = this.matrixClient.credentials.userId;
if (phasedRollOutExpiredForUser(userId, LAZY_LOADING_FEATURE, Date.now())) {
opts.lazyLoadMembers = true;
}
}
opts.lazyLoadMembers = true;

// Connect the matrix client to the dispatcher
MatrixActionCreators.start(this.matrixClient);
Expand Down
31 changes: 0 additions & 31 deletions src/components/views/settings/tabs/LabsSettingsTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,38 +28,7 @@ export class LabsSettingToggle extends React.Component {
featureId: PropTypes.string.isRequired,
};

async _onLazyLoadChanging(enabling) {
// don't prevent turning LL off when not supported
if (enabling) {
const supported = await MatrixClientPeg.get().doesServerSupportLazyLoading();
if (!supported) {
await new Promise((resolve) => {
const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
Modal.createDialog(QuestionDialog, {
title: _t("Lazy loading members not supported"),
description:
<div>
{ _t("Lazy loading is not supported by your " +
"current homeserver.") }
</div>,
button: _t("OK"),
onFinished: resolve,
});
});
return false;
}
}
return true;
}

_onChange = async (checked) => {
if (this.props.featureId === "feature_lazyloading") {
const confirmed = await this._onLazyLoadChanging(checked);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we're dropping the homeserver check, please also delete the function above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

if (!confirmed) {
return;
}
}

await SettingsStore.setFeatureEnabled(this.props.featureId, checked);
this.forceUpdate();
};
Expand Down
7 changes: 0 additions & 7 deletions src/settings/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,6 @@ export const SETTINGS = {
default: false,
controller: new CustomStatusController(),
},
"feature_lazyloading": {
isFeature: true,
displayName: _td("Increase performance by only loading room members on first view"),
supportedLevels: LEVELS_FEATURE,
controller: new LazyLoadingController(),
default: true,
},
"feature_keybackup": {
isFeature: true,
displayName: _td("Backup of encryption keys to server"),
Expand Down
29 changes: 0 additions & 29 deletions src/settings/controllers/LazyLoadingController.js

This file was deleted.