Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Granular settings #5468

Merged
merged 8 commits into from Nov 15, 2017
Next

Use granular settings instead of synced settings

Signed-off-by: Travis Ralston <travpc@gmail.com>
  • Loading branch information
turt2live committed Oct 29, 2017
commit f6177cd7b561ce544cce646ceee7f6bf288c8f11
@@ -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') ?
<GroupsButton tooltip={true} /> : null;

return (
@@ -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});
},
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.