Fix extension setting dialogs not handling duplicate keys (fixes #2876)
This commit is contained in:
parent
7ef5e59421
commit
3438d72232
1 changed files with 4 additions and 1 deletions
|
@ -210,8 +210,11 @@ class ExtensionDetailsController(bundle: Bundle? = null) :
|
||||||
f.showDialog(router)
|
f.showDialog(router)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("UNCHECKED_CAST")
|
||||||
override fun <T : Preference> findPreference(key: CharSequence): T? {
|
override fun <T : Preference> findPreference(key: CharSequence): T? {
|
||||||
return preferenceScreen!!.findPreference(key)
|
// We track [lastOpenPreferencePosition] when displaying the dialog
|
||||||
|
// [key] isn't useful since there may be duplicates
|
||||||
|
return preferenceScreen!!.getPreference(lastOpenPreferencePosition!!) as T
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun loginDialogClosed(source: LoginSource) {
|
override fun loginDialogClosed(source: LoginSource) {
|
||||||
|
|
Reference in a new issue