From 8a39d160f6e0c0626181279163c95ac88f01e0c5 Mon Sep 17 00:00:00 2001 From: Florian Orben Date: Tue, 1 Dec 2015 22:40:24 +0100 Subject: switch to only use emoji one smileys; remove setting to switch --- .../user_settings/user_settings_display.jsx | 85 +--------------------- 1 file changed, 2 insertions(+), 83 deletions(-) (limited to 'web/react/components/user_settings') diff --git a/web/react/components/user_settings/user_settings_display.jsx b/web/react/components/user_settings/user_settings_display.jsx index c83b74e62..43c8d33d1 100644 --- a/web/react/components/user_settings/user_settings_display.jsx +++ b/web/react/components/user_settings/user_settings_display.jsx @@ -6,17 +6,14 @@ import SettingItemMin from '../setting_item_min.jsx'; import SettingItemMax from '../setting_item_max.jsx'; import Constants from '../../utils/constants.jsx'; import PreferenceStore from '../../stores/preference_store.jsx'; -import * as Utils from '../../utils/utils.jsx'; function getDisplayStateFromStores() { const militaryTime = PreferenceStore.getPreference(Constants.Preferences.CATEGORY_DISPLAY_SETTINGS, 'use_military_time', {value: 'false'}); const nameFormat = PreferenceStore.getPreference(Constants.Preferences.CATEGORY_DISPLAY_SETTINGS, 'name_format', {value: 'username'}); - const emojiStyle = PreferenceStore.getPreference(Constants.Preferences.CATEGORY_DISPLAY_SETTINGS, 'emoji_style', {value: 'default'}); return { militaryTime: militaryTime.value, - nameFormat: nameFormat.value, - emojiStyle: emojiStyle.value + nameFormat: nameFormat.value }; } @@ -34,9 +31,8 @@ export default class UserSettingsDisplay extends React.Component { handleSubmit() { const timePreference = PreferenceStore.setPreference(Constants.Preferences.CATEGORY_DISPLAY_SETTINGS, 'use_military_time', this.state.militaryTime); const namePreference = PreferenceStore.setPreference(Constants.Preferences.CATEGORY_DISPLAY_SETTINGS, 'name_format', this.state.nameFormat); - const emojiStyle = PreferenceStore.setPreference(Constants.Preferences.CATEGORY_DISPLAY_SETTINGS, 'emoji_style', this.state.emojiStyle); - savePreferences([timePreference, namePreference, emojiStyle], + savePreferences([timePreference, namePreference], () => { PreferenceStore.emitChange(); this.updateSection(''); @@ -52,9 +48,6 @@ export default class UserSettingsDisplay extends React.Component { handleNameRadio(nameFormat) { this.setState({nameFormat}); } - handleEmojiRadio(emojiStyle) { - this.setState({emojiStyle}); - } updateSection(section) { this.setState(getDisplayStateFromStores()); this.props.updateSection(section); @@ -63,7 +56,6 @@ export default class UserSettingsDisplay extends React.Component { const serverError = this.state.serverError || null; let clockSection; let nameFormatSection; - let emojiSection; if (this.props.activeSection === 'clock') { const clockFormat = [false, false]; if (this.state.militaryTime === 'true') { @@ -217,77 +209,6 @@ export default class UserSettingsDisplay extends React.Component { ); } - if (this.props.activeSection === 'emoji') { - const inputs = [ -
-
- -
-
-
- -
-
-

{'Select how you prefer time displayed.'}
-
- ]; - - emojiSection = ( - { - this.updateSection(''); - e.preventDefault(); - }} - /> - ); - } else { - const describe = this.state.emojiStyle === 'default' ? 'Default Style' : 'Emoji One Style'; - emojiSection = ( - { - this.props.updateSection('emoji'); - }} - /> - ); - } - return (
@@ -318,8 +239,6 @@ export default class UserSettingsDisplay extends React.Component {
{nameFormatSection}
- {emojiSection} -
); -- cgit v1.2.3-1-g7c22