Merge pull request #3865 from matrix-org/dbkr/new_session_toast_feature_flag

Move feature flag check for new session toast
This commit is contained in:
David Baker 2020-01-17 20:38:44 +00:00 committed by GitHub
commit 5584068c5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,17 +56,16 @@ export default class DeviceListener {
_onDevicesUpdated = (users) => {
if (!users.includes(MatrixClientPeg.get().getUserId())) return;
if (!SettingsStore.isFeatureEnabled("feature_cross_signing")) return;
this.recheck();
}
_onDeviceVerificationChanged = (users) => {
if (!users.includes(MatrixClientPeg.get().getUserId())) return;
if (!SettingsStore.isFeatureEnabled("feature_cross_signing")) return;
this.recheck();
}
async recheck() {
if (!SettingsStore.isFeatureEnabled("feature_cross_signing")) return;
const cli = MatrixClientPeg.get();
if (!cli.isCryptoEnabled()) return false;