mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 19:27:25 +01:00
Fix extension setting dialogs not handling duplicate keys (fixes #2876)
This commit is contained in:
parent
9876732875
commit
c2330fe3af
@ -191,8 +191,11 @@ class ExtensionDetailsController(bundle: Bundle? = null) :
|
||||
f.showDialog(router)
|
||||
}
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
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
|
||||
}
|
||||
|
||||
private companion object {
|
||||
|
Loading…
Reference in New Issue
Block a user