Fix mention keywords setting (#2127)

This commit is contained in:
Elias Nahum 2018-09-17 05:04:24 -03:00 committed by Sudheer
parent cb5810c2d8
commit 2f88ae2f3c
2 changed files with 5 additions and 6 deletions

View file

@ -64,8 +64,9 @@ class NotificationSettingsMentionsAndroid extends NotificationSettingsMentionsBa
<TextInputWithLocalizedPlaceholder
autoFocus={true}
value={this.keywords}
blurOnSubmit={false}
blurOnSubmit={true}
onChangeText={this.onKeywordsChangeText}
onSubmitEditing={this.saveMentionKeys}
multiline={false}
style={style.input}
autoCapitalize='none'
@ -73,6 +74,7 @@ class NotificationSettingsMentionsAndroid extends NotificationSettingsMentionsBa
placeholder={{id: 'mobile.notification_settings_mentions.keywordsDescription', defaultMessage: 'Other words that trigger a mention'}}
placeholderTextColor={changeOpacity(theme.centerChannelColor, 0.4)}
returnKeyType='done'
returnKeyLabel={this.props.intl.formatMessage({id: 'mobile.notification_settings.modal_save'})}
underlineColorAndroid={theme.linkColor}
/>
<FormattedText

View file

@ -42,10 +42,6 @@ export default class NotificationSettingsMentionsKeywords extends PureComponent
};
onKeywordsChangeText = (keywords) => {
if (keywords.endsWith('\n')) {
return this.handleSubmit();
}
return this.setState({keywords});
};
@ -77,8 +73,9 @@ export default class NotificationSettingsMentionsKeywords extends PureComponent
autoFocus={true}
ref={this.keywordsRef}
value={keywords}
blurOnSubmit={false}
blurOnSubmit={true}
onChangeText={this.onKeywordsChangeText}
onSubmitEditing={this.handleSubmit}
multiline={true}
numberOfLines={1}
style={style.input}