mirror of https://github.com/vector-im/riot-web
check if phased rollout has expired before trying to enable LL
parent
f717c5697b
commit
ef204b6e99
|
@ -26,6 +26,7 @@ import EventTimelineSet from 'matrix-js-sdk/lib/models/event-timeline-set';
|
||||||
import createMatrixClient from './utils/createMatrixClient';
|
import createMatrixClient from './utils/createMatrixClient';
|
||||||
import SettingsStore from './settings/SettingsStore';
|
import SettingsStore from './settings/SettingsStore';
|
||||||
import MatrixActionCreators from './actions/MatrixActionCreators';
|
import MatrixActionCreators from './actions/MatrixActionCreators';
|
||||||
|
import {phasedRollOutExpiredForUser} from "./PhasedRollOut";
|
||||||
|
|
||||||
interface MatrixClientCreds {
|
interface MatrixClientCreds {
|
||||||
homeserverUrl: string,
|
homeserverUrl: string,
|
||||||
|
@ -124,8 +125,12 @@ class MatrixClientPeg {
|
||||||
// the react sdk doesn't work without this, so don't allow
|
// the react sdk doesn't work without this, so don't allow
|
||||||
opts.pendingEventOrdering = "detached";
|
opts.pendingEventOrdering = "detached";
|
||||||
|
|
||||||
if (SettingsStore.isFeatureEnabled('feature_lazyloading')) {
|
const LAZY_LOADING_FEATURE = "feature_lazyloading";
|
||||||
opts.lazyLoadMembers = true;
|
if (SettingsStore.isFeatureEnabled(LAZY_LOADING_FEATURE)) {
|
||||||
|
const userId = this.matrixClient.credentials.userId;
|
||||||
|
if (phasedRollOutExpiredForUser(userId, LAZY_LOADING_FEATURE, Date.now())) {
|
||||||
|
opts.lazyLoadMembers = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Connect the matrix client to the dispatcher
|
// Connect the matrix client to the dispatcher
|
||||||
|
|
Loading…
Reference in New Issue