Add option to hide the stickers button in the composer
Signed-off-by: Aaron Raimist <aaron@raim.ist>
This commit is contained in:
parent
461b569278
commit
b8334bfd4a
4 changed files with 9 additions and 1 deletions
|
@ -423,7 +423,8 @@ export default class MessageComposer extends React.Component {
|
||||||
<EmojiButton key="emoji_button" addEmoji={this.addEmoji} />,
|
<EmojiButton key="emoji_button" addEmoji={this.addEmoji} />,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (SettingsStore.getValue(UIFeature.Widgets)) {
|
if (SettingsStore.getValue(UIFeature.Widgets) &&
|
||||||
|
SettingsStore.getValue("MessageComposerInput.showStickersButton")) {
|
||||||
controls.push(<Stickerpicker key="stickerpicker_controls_button" room={this.props.room} />);
|
controls.push(<Stickerpicker key="stickerpicker_controls_button" room={this.props.room} />);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ export default class PreferencesUserSettingsTab extends React.Component {
|
||||||
'MessageComposerInput.suggestEmoji',
|
'MessageComposerInput.suggestEmoji',
|
||||||
'sendTypingNotifications',
|
'sendTypingNotifications',
|
||||||
'MessageComposerInput.ctrlEnterToSend',
|
'MessageComposerInput.ctrlEnterToSend',
|
||||||
|
'MessageComposerInput.showStickersButton',
|
||||||
];
|
];
|
||||||
|
|
||||||
static TIMELINE_SETTINGS = [
|
static TIMELINE_SETTINGS = [
|
||||||
|
|
|
@ -783,6 +783,7 @@
|
||||||
"Font size": "Font size",
|
"Font size": "Font size",
|
||||||
"Use custom size": "Use custom size",
|
"Use custom size": "Use custom size",
|
||||||
"Enable Emoji suggestions while typing": "Enable Emoji suggestions while typing",
|
"Enable Emoji suggestions while typing": "Enable Emoji suggestions while typing",
|
||||||
|
"Show stickers button": "Show stickers button",
|
||||||
"Use a more compact ‘Modern’ layout": "Use a more compact ‘Modern’ layout",
|
"Use a more compact ‘Modern’ layout": "Use a more compact ‘Modern’ layout",
|
||||||
"Show a placeholder for removed messages": "Show a placeholder for removed messages",
|
"Show a placeholder for removed messages": "Show a placeholder for removed messages",
|
||||||
"Show join/leave messages (invites/kicks/bans unaffected)": "Show join/leave messages (invites/kicks/bans unaffected)",
|
"Show join/leave messages (invites/kicks/bans unaffected)": "Show join/leave messages (invites/kicks/bans unaffected)",
|
||||||
|
|
|
@ -240,6 +240,11 @@ export const SETTINGS: {[setting: string]: ISetting} = {
|
||||||
default: true,
|
default: true,
|
||||||
invertedSettingName: 'MessageComposerInput.dontSuggestEmoji',
|
invertedSettingName: 'MessageComposerInput.dontSuggestEmoji',
|
||||||
},
|
},
|
||||||
|
"MessageComposerInput.showStickersButton": {
|
||||||
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
||||||
|
displayName: _td('Show stickers button'),
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
// TODO: Wire up appropriately to UI (FTUE notifications)
|
// TODO: Wire up appropriately to UI (FTUE notifications)
|
||||||
"Notifications.alwaysShowBadgeCounts": {
|
"Notifications.alwaysShowBadgeCounts": {
|
||||||
supportedLevels: LEVELS_ROOM_OR_ACCOUNT,
|
supportedLevels: LEVELS_ROOM_OR_ACCOUNT,
|
||||||
|
|
Loading…
Reference in a new issue