Move scrollToPreference to the right place.

This commit is contained in:
David Langley 2021-08-27 12:11:11 +01:00
parent dbc76c7aee
commit 9b3fe7449b
1 changed files with 1 additions and 2 deletions

View File

@ -91,12 +91,10 @@ class VectorSettingsKeywordAndMentionsNotificationPreferenceFragment
editKeywordPreference.listener = object: KeywordPreference.Listener {
override fun didAddKeyword(keyword: String) {
addKeyword(keyword)
scrollToPreference(editKeywordPreference)
}
override fun didRemoveKeyword(keyword: String) {
removeKeyword(keyword)
scrollToPreference(editKeywordPreference)
}
}
}
@ -130,6 +128,7 @@ class VectorSettingsKeywordAndMentionsNotificationPreferenceFragment
fun updateWithKeywords(keywords: Set<String>) {
val editKeywordPreference = findPreference<KeywordPreference>("SETTINGS_KEYWORD_EDIT") ?: return
editKeywordPreference.keywords = keywords
scrollToPreference(editKeywordPreference)
}
fun addKeyword(keyword: String) {