Filters> Tabs: use checkbox instead of switch (#3927)

Nowhere else in the preferences are checkboxes used.

Also removed the now unused extension function.

Fixes #3535
This commit is contained in:
Angelo Suzuki 2023-08-06 11:50:11 +02:00 committed by GitHub
commit a84d7f56a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 13 deletions

View file

@ -6,7 +6,6 @@ import androidx.activity.result.ActivityResultRegistryOwner
import androidx.annotation.StringRes
import androidx.core.widget.doAfterTextChanged
import androidx.lifecycle.LifecycleOwner
import androidx.preference.CheckBoxPreference
import androidx.preference.EditTextPreference
import androidx.preference.ListPreference
import androidx.preference.Preference
@ -86,15 +85,6 @@ inline fun PreferenceParent.validatedEditTextPreference(
return pref
}
inline fun PreferenceParent.checkBoxPreference(
builder: CheckBoxPreference.() -> Unit
): CheckBoxPreference {
val pref = CheckBoxPreference(context)
builder(pref)
addPref(pref)
return pref
}
inline fun PreferenceParent.preferenceCategory(
@StringRes title: Int? = null,
builder: PreferenceParent.(PreferenceCategory) -> Unit