diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionDetailsController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionDetailsController.kt index faedb06e1e..c8075de4f3 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionDetailsController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionDetailsController.kt @@ -210,8 +210,11 @@ class ExtensionDetailsController(bundle: Bundle? = null) : f.showDialog(router) } + @Suppress("UNCHECKED_CAST") override fun 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) {