diff --git a/app/screens/settings/notification_settings_mentions/notification_settings_mention_base.js b/app/screens/settings/notification_settings_mentions/notification_settings_mention_base.js index 49acbb757..fc2987eb8 100644 --- a/app/screens/settings/notification_settings_mentions/notification_settings_mention_base.js +++ b/app/screens/settings/notification_settings_mentions/notification_settings_mention_base.js @@ -53,19 +53,19 @@ export default class NotificationSettingsMentionsBase extends PureComponent { } const comments = notifyProps.comments || 'any'; + const mentionKeysString = mentionKeys.join(','); const newState = { ...notifyProps, comments, newReplyValue: comments, usernameMention: usernameMentionIndex > -1, - mention_keys: mentionKeys.join(','), + mention_keys: mentionKeysString, + androidKeywords: mentionKeysString, showKeywordsModal: false, showReplyModal: false, }; - this.keywords = newState.mention_keys; - return newState; }; diff --git a/app/screens/settings/notification_settings_mentions/notification_settings_mentions.android.js b/app/screens/settings/notification_settings_mentions/notification_settings_mentions.android.js index 095f3259c..6534439da 100644 --- a/app/screens/settings/notification_settings_mentions/notification_settings_mentions.android.js +++ b/app/screens/settings/notification_settings_mentions/notification_settings_mentions.android.js @@ -23,8 +23,10 @@ import NotificationSettingsMentionsBase from './notification_settings_mention_ba class NotificationSettingsMentionsAndroid extends NotificationSettingsMentionsBase { cancelMentionKeys = () => { - this.setState({showKeywordsModal: false}); - this.keywords = this.state.mention_keys; + this.setState({ + androidKeywords: this.state.mention_keys, + showKeywordsModal: false, + }); }; cancelReplyNotification = () => { @@ -34,8 +36,8 @@ class NotificationSettingsMentionsAndroid extends NotificationSettingsMentionsBa }); }; - onKeywordsChangeText = (value) => { - this.keywords = value; + onKeywordsChangeText = (androidKeywords) => { + this.setState({androidKeywords}); }; onReplyChanged = (value) => { @@ -64,7 +66,7 @@ class NotificationSettingsMentionsAndroid extends NotificationSettingsMentionsBa { - this.setState({showKeywordsModal: false}); - this.updateMentionKeys(this.keywords); + this.updateMentionKeys(this.state.androidKeywords); }; saveReplyNotification = () => {