diff --git a/vector/src/main/java/im/vector/app/core/preference/KeywordPreference.kt b/vector/src/main/java/im/vector/app/core/preference/KeywordPreference.kt index 37d9a598e7..c70b403550 100644 --- a/vector/src/main/java/im/vector/app/core/preference/KeywordPreference.kt +++ b/vector/src/main/java/im/vector/app/core/preference/KeywordPreference.kt @@ -94,7 +94,6 @@ class KeywordPreference : VectorPreference { if (keyword.isEmpty()) { return false } - _keywords.add(keyword) listener?.didAddKeyword(keyword) onPreferenceChangeListener?.onPreferenceChange(this, _keywords) notifyChanged() @@ -123,7 +122,6 @@ class KeywordPreference : VectorPreference { if (!keywordsEnabled) { return@setOnCloseIconClickListener } - _keywords.remove(keyword) listener?.didRemoveKeyword(keyword) onPreferenceChangeListener?.onPreferenceChange(this, _keywords) notifyChanged() diff --git a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsKeywordAndMentionsNotificationPreferenceFragment.kt b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsKeywordAndMentionsNotificationPreferenceFragment.kt index 82663ae910..dd412742ca 100644 --- a/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsKeywordAndMentionsNotificationPreferenceFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/notifications/VectorSettingsKeywordAndMentionsNotificationPreferenceFragment.kt @@ -148,7 +148,7 @@ class VectorSettingsKeywordAndMentionsNotificationPreferenceFragment hideLoadingView() // Already added to UI, no-op on success result.onFailure { - // Just display an error on failure, keywords will update when push rules refreshed + // Just display an error on failure, keywords have not been added to the UI activity?.toast(errorFormatter.toHumanReadable(it)) } } @@ -166,7 +166,7 @@ class VectorSettingsKeywordAndMentionsNotificationPreferenceFragment hideLoadingView() // Already added to UI, no-op on success result.onFailure { - // Just display an error on failure, keywords will update when push rules refreshed + // Just display an error on failure, keywords have not been added to the UI activity?.toast(errorFormatter.toHumanReadable(it)) } }