diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/preference/PreferenceDSL.kt b/app/src/main/java/eu/kanade/tachiyomi/util/preference/PreferenceDSL.kt index 644f6a15c..e978ea6bf 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/preference/PreferenceDSL.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/preference/PreferenceDSL.kt @@ -128,6 +128,12 @@ inline fun Preference.bindTo(preference: com.tfcporciuncula.flow.Preference< defaultValue = preference.defaultValue } +inline fun ListPreference.bindTo(preference: com.tfcporciuncula.flow.Preference) { + key = preference.key + // ListPreferences persist values as strings, even when we're using our IntListPreference + defaultValue = preference.defaultValue.toString() +} + inline fun Preference.onClick(crossinline block: () -> Unit) { setOnPreferenceClickListener { block(); true } }