From f6177cd7b561ce544cce646ceee7f6bf288c8f11 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Sun, 29 Oct 2017 01:51:02 -0600 Subject: [PATCH] Use granular settings instead of synced settings Signed-off-by: Travis Ralston --- src/components/structures/BottomLeftMenu.js | 4 ++-- src/components/views/context_menus/MessageContextMenu.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/structures/BottomLeftMenu.js b/src/components/structures/BottomLeftMenu.js index 4014261ca..5511cc8c8 100644 --- a/src/components/structures/BottomLeftMenu.js +++ b/src/components/structures/BottomLeftMenu.js @@ -21,7 +21,7 @@ import sdk from 'matrix-react-sdk'; import dis from 'matrix-react-sdk/lib/dispatcher'; import Velocity from 'velocity-vector'; import 'velocity-vector/velocity.ui'; -import UserSettingsStore from 'matrix-react-sdk/lib/UserSettingsStore'; +import SettingsStore from "matrix-react-sdk/lib/settings/SettingsStore"; const CALLOUT_ANIM_DURATION = 1000; @@ -170,7 +170,7 @@ module.exports = React.createClass({ const GroupsButton = sdk.getComponent('elements.GroupsButton'); const SettingsButton = sdk.getComponent('elements.SettingsButton'); - const groupsButton = UserSettingsStore.isFeatureEnabled('feature_groups') ? + const groupsButton = SettingsStore.isFeatureEnabled('feature_groups') ? : null; return ( diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index a07d11626..d8f9a4daa 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -24,7 +24,7 @@ const sdk = require('matrix-react-sdk'); import { _t } from 'matrix-react-sdk/lib/languageHandler'; const Modal = require('matrix-react-sdk/lib/Modal'); const Resend = require("matrix-react-sdk/lib/Resend"); -import * as UserSettingsStore from 'matrix-react-sdk/lib/UserSettingsStore'; +import SettingsStore from "matrix-react-sdk/lib/settings/SettingsStore"; module.exports = React.createClass({ displayName: 'MessageContextMenu', @@ -67,7 +67,7 @@ module.exports = React.createClass({ let canPin = room.currentState.mayClientSendStateEvent('m.room.pinned_events', cli); // HACK: Intentionally say we can't pin if the user doesn't want to use the functionality - if (!UserSettingsStore.isFeatureEnabled("feature_pinning")) canPin = false; + if (!SettingsStore.isFeatureEnabled("feature_pinning")) canPin = false; this.setState({canRedact, canPin}); },