Hide blur wallpaper preference if it is not supported by device
This commit is contained in:
parent
26e312f42f
commit
4c2324ff59
@ -163,8 +163,8 @@ fun AppearanceSettingsScreen() {
|
|||||||
viewModel.setDimWallpaper(it)
|
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()
|
val blurWallpaper by viewModel.blurWallpaper.observeAsState()
|
||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
title = stringResource(R.string.preference_blur_wallpaper),
|
title = stringResource(R.string.preference_blur_wallpaper),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user