Remove unnecessary SDK version check

This commit is contained in:
Patryk Michalik
2021-10-23 13:41:14 +02:00
parent 7849d1ecde
commit ac2dfd86e4

View File

@@ -75,31 +75,29 @@ fun GeneralPreferences() {
label = stringResource(id = R.string.font_label)
)
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val wrapAdaptiveIcons = prefs.wrapAdaptiveIcons.getAdapter()
PreferenceGroup(
heading = stringResource(id = R.string.auto_adaptive_icons_label),
description = stringResource(id = (R.string.adaptive_icon_background_description)),
showDescription = wrapAdaptiveIcons.state.value
val wrapAdaptiveIcons = prefs.wrapAdaptiveIcons.getAdapter()
PreferenceGroup(
heading = stringResource(id = R.string.auto_adaptive_icons_label),
description = stringResource(id = (R.string.adaptive_icon_background_description)),
showDescription = wrapAdaptiveIcons.state.value
) {
SwitchPreference(
adapter = wrapAdaptiveIcons,
label = stringResource(id = R.string.auto_adaptive_icons_label),
description = stringResource(id = R.string.auto_adaptive_icons_description),
)
AnimatedVisibility(
visible = wrapAdaptiveIcons.state.value,
enter = expandVertically() + fadeIn(),
exit = shrinkVertically() + fadeOut()
) {
SwitchPreference(
adapter = wrapAdaptiveIcons,
label = stringResource(id = R.string.auto_adaptive_icons_label),
description = stringResource(id = R.string.auto_adaptive_icons_description),
SliderPreference(
label = stringResource(id = R.string.background_lightness_label),
adapter = prefs.coloredBackgroundLightness.getAdapter(),
valueRange = 0F..1F,
step = 0.1f,
showAsPercentage = true
)
AnimatedVisibility(
visible = wrapAdaptiveIcons.state.value,
enter = expandVertically() + fadeIn(),
exit = shrinkVertically() + fadeOut()
) {
SliderPreference(
label = stringResource(id = R.string.background_lightness_label),
adapter = prefs.coloredBackgroundLightness.getAdapter(),
valueRange = 0F..1F,
step = 0.1f,
showAsPercentage = true
)
}
}
}
}