You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-22 04:02:40 +03:00
Add feature flag for counters
This commit is contained in:
committed by
Erik Johnston
parent
712241d710
commit
4c204e88be
@@ -25,6 +25,7 @@ import AppsDrawer from './AppsDrawer';
|
|||||||
import { _t } from '../../../languageHandler';
|
import { _t } from '../../../languageHandler';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import RateLimitedFunc from '../../../ratelimitedfunc';
|
import RateLimitedFunc from '../../../ratelimitedfunc';
|
||||||
|
import SettingsStore from "../../../settings/SettingsStore";
|
||||||
|
|
||||||
|
|
||||||
module.exports = React.createClass({
|
module.exports = React.createClass({
|
||||||
@@ -164,7 +165,7 @@ module.exports = React.createClass({
|
|||||||
/>;
|
/>;
|
||||||
|
|
||||||
let stateViews = null;
|
let stateViews = null;
|
||||||
if (this.props.room) {
|
if (this.props.room && SettingsStore.isFeatureEnabled("feature_state_counters")) {
|
||||||
const stateEvs = this.props.room.currentState.getStateEvents('re.jki.counter');
|
const stateEvs = this.props.room.currentState.getStateEvents('re.jki.counter');
|
||||||
|
|
||||||
let counters = [];
|
let counters = [];
|
||||||
|
|||||||
@@ -1404,5 +1404,6 @@
|
|||||||
"Go to Settings": "Go to Settings",
|
"Go to Settings": "Go to Settings",
|
||||||
"Failed to set direct chat tag": "Failed to set direct chat tag",
|
"Failed to set direct chat tag": "Failed to set direct chat tag",
|
||||||
"Failed to remove tag %(tagName)s from room": "Failed to remove tag %(tagName)s from room",
|
"Failed to remove tag %(tagName)s from room": "Failed to remove tag %(tagName)s from room",
|
||||||
"Failed to add tag %(tagName)s to room": "Failed to add tag %(tagName)s to room"
|
"Failed to add tag %(tagName)s to room": "Failed to add tag %(tagName)s to room",
|
||||||
|
"Render simple counters in room header": "Render simple counters in room header"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,6 +102,12 @@ export const SETTINGS = {
|
|||||||
supportedLevels: LEVELS_FEATURE,
|
supportedLevels: LEVELS_FEATURE,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
"feature_state_counters": {
|
||||||
|
isFeature: true,
|
||||||
|
displayName: _td("Render simple counters in room header"),
|
||||||
|
supportedLevels: LEVELS_FEATURE,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
"MessageComposerInput.dontSuggestEmoji": {
|
"MessageComposerInput.dontSuggestEmoji": {
|
||||||
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
||||||
displayName: _td('Disable Emoji suggestions while typing'),
|
displayName: _td('Disable Emoji suggestions while typing'),
|
||||||
|
|||||||
Reference in New Issue
Block a user