diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/helpers/AppBarTitle.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/helpers/AppBarTitle.kt index 93bbd83b66..441fde481f 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/helpers/AppBarTitle.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/helpers/AppBarTitle.kt @@ -24,8 +24,8 @@ fun AppBarTitle( bottomPadding: Dp = DEFAULT_PADDING * 1.5f + 8.dp, enableAlphaChanges: Boolean = true ) { - val handler = LocalAppBarHandler.current - val connection = if (enableAlphaChanges) handler?.connection else null + val handler = if (enableAlphaChanges) LocalAppBarHandler.current else null + val connection = handler?.connection LaunchedEffect(title) { handler?.title?.value = title }