AppBarTitle without alpha

This commit is contained in:
Avently
2024-11-21 17:06:22 +07:00
parent 7e655742a0
commit 615926a495
@@ -17,9 +17,15 @@ import dev.icerock.moko.resources.compose.painterResource
import kotlin.math.absoluteValue
@Composable
fun AppBarTitle(title: String, hostDevice: Pair<Long?, String>? = null, withPadding: Boolean = true, bottomPadding: Dp = DEFAULT_PADDING * 1.5f + 8.dp) {
fun AppBarTitle(
title: String,
hostDevice: Pair<Long?, String>? = null,
withPadding: Boolean = true,
bottomPadding: Dp = DEFAULT_PADDING * 1.5f + 8.dp,
enableAlphaChanges: Boolean = true
) {
val handler = LocalAppBarHandler.current
val connection = handler?.connection
val connection = if (enableAlphaChanges) handler?.connection else null
LaunchedEffect(title) {
handler?.title?.value = title
}