Hide blur wallpaper preference if it is not supported by device

This commit is contained in:
MM20 2022-09-23 23:18:38 +02:00
parent 26e312f42f
commit 4c2324ff59
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389

View File

@ -163,8 +163,8 @@ fun AppearanceSettingsScreen() {
viewModel.setDimWallpaper(it)
}
)
if (isAtLeastApiLevel(31)) {
val isBlurSupported = remember { viewModel.isBlurAvailable(context) }
val isBlurSupported = remember { viewModel.isBlurAvailable(context) }
if (isBlurSupported) {
val blurWallpaper by viewModel.blurWallpaper.observeAsState()
SwitchPreference(
title = stringResource(R.string.preference_blur_wallpaper),