forked from matrix/element-web
Use granular settings instead of synced settings
Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
parent
c74e6c3c0c
commit
f6177cd7b5
|
@ -21,7 +21,7 @@ import sdk from 'matrix-react-sdk';
|
||||||
import dis from 'matrix-react-sdk/lib/dispatcher';
|
import dis from 'matrix-react-sdk/lib/dispatcher';
|
||||||
import Velocity from 'velocity-vector';
|
import Velocity from 'velocity-vector';
|
||||||
import 'velocity-vector/velocity.ui';
|
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;
|
const CALLOUT_ANIM_DURATION = 1000;
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ module.exports = React.createClass({
|
||||||
const GroupsButton = sdk.getComponent('elements.GroupsButton');
|
const GroupsButton = sdk.getComponent('elements.GroupsButton');
|
||||||
const SettingsButton = sdk.getComponent('elements.SettingsButton');
|
const SettingsButton = sdk.getComponent('elements.SettingsButton');
|
||||||
|
|
||||||
const groupsButton = UserSettingsStore.isFeatureEnabled('feature_groups') ?
|
const groupsButton = SettingsStore.isFeatureEnabled('feature_groups') ?
|
||||||
<GroupsButton tooltip={true} /> : null;
|
<GroupsButton tooltip={true} /> : null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -24,7 +24,7 @@ const sdk = require('matrix-react-sdk');
|
||||||
import { _t } from 'matrix-react-sdk/lib/languageHandler';
|
import { _t } from 'matrix-react-sdk/lib/languageHandler';
|
||||||
const Modal = require('matrix-react-sdk/lib/Modal');
|
const Modal = require('matrix-react-sdk/lib/Modal');
|
||||||
const Resend = require("matrix-react-sdk/lib/Resend");
|
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({
|
module.exports = React.createClass({
|
||||||
displayName: 'MessageContextMenu',
|
displayName: 'MessageContextMenu',
|
||||||
|
@ -67,7 +67,7 @@ module.exports = React.createClass({
|
||||||
let canPin = room.currentState.mayClientSendStateEvent('m.room.pinned_events', cli);
|
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
|
// 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});
|
this.setState({canRedact, canPin});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue