mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-19 08:45:27 +02:00
Add missing API level check
This commit is contained in:
parent
409c52d899
commit
f5fdf181a2
@ -19,6 +19,7 @@
|
|||||||
package com.sadellie.unitto.feature.settings.display
|
package com.sadellie.unitto.feature.settings.display
|
||||||
|
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
|
import androidx.annotation.RequiresApi
|
||||||
import androidx.compose.animation.AnimatedVisibility
|
import androidx.compose.animation.AnimatedVisibility
|
||||||
import androidx.compose.animation.expandVertically
|
import androidx.compose.animation.expandVertically
|
||||||
import androidx.compose.animation.fadeIn
|
import androidx.compose.animation.fadeIn
|
||||||
@ -95,8 +96,10 @@ internal fun DisplayRoute(
|
|||||||
themmoController.setMonetMode(MonetMode.TonalSpot)
|
themmoController.setMonetMode(MonetMode.TonalSpot)
|
||||||
viewModel.updateMonetMode(MonetMode.TonalSpot)
|
viewModel.updateMonetMode(MonetMode.TonalSpot)
|
||||||
}
|
}
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) {
|
||||||
themmoController.enableDynamicTheme(newValue)
|
themmoController.enableDynamicTheme(newValue)
|
||||||
viewModel.updateDynamicTheme(newValue)
|
viewModel.updateDynamicTheme(newValue)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
isAmoledThemeEnabled = themmoController.isAmoledThemeEnabled,
|
isAmoledThemeEnabled = themmoController.isAmoledThemeEnabled,
|
||||||
onAmoledThemeChange = { newValue ->
|
onAmoledThemeChange = { newValue ->
|
||||||
@ -295,6 +298,7 @@ private fun DisplayScreen(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequiresApi(Build.VERSION_CODES.O_MR1)
|
||||||
@Preview
|
@Preview
|
||||||
@Composable
|
@Composable
|
||||||
private fun Preview() {
|
private fun Preview() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user