From c44327e8b9a5afa2fba4927fc56ba4d21b4a03ef Mon Sep 17 00:00:00 2001 From: Rebecca Franks Date: Mon, 29 Apr 2024 13:09:13 +0100 Subject: [PATCH] Formatting --- .../jetsnack/ui/home/DestinationBar.kt | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/Jetsnack/app/src/main/java/com/example/jetsnack/ui/home/DestinationBar.kt b/Jetsnack/app/src/main/java/com/example/jetsnack/ui/home/DestinationBar.kt index 3caeb48aee..3de514cd95 100644 --- a/Jetsnack/app/src/main/java/com/example/jetsnack/ui/home/DestinationBar.kt +++ b/Jetsnack/app/src/main/java/com/example/jetsnack/ui/home/DestinationBar.kt @@ -56,17 +56,25 @@ import java.lang.IllegalStateException @Composable fun DestinationBar(modifier: Modifier = Modifier) { - val sharedElementScope = LocalSharedTransitionScope.current ?: throw IllegalStateException("No shared element scope") - val navAnimatedScope = LocalNavAnimatedVisibilityScope.current ?: throw IllegalStateException("No nav scope") - with(sharedElementScope){ - with (navAnimatedScope){ - Column(modifier = modifier - .renderInSharedTransitionScopeOverlay() - .animateEnterExit(enter = slideInVertically(spatialExpressiveSpring()) { -it }, exit = slideOutVertically(spatialExpressiveSpring()) { -it })) { + val sharedElementScope = + LocalSharedTransitionScope.current ?: throw IllegalStateException("No shared element scope") + val navAnimatedScope = + LocalNavAnimatedVisibilityScope.current ?: throw IllegalStateException("No nav scope") + with(sharedElementScope) { + with(navAnimatedScope) { + Column( + modifier = modifier + .renderInSharedTransitionScopeOverlay() + .animateEnterExit( + enter = slideInVertically(spatialExpressiveSpring()) { -it }, + exit = slideOutVertically(spatialExpressiveSpring()) { -it }) + ) { TopAppBar( - backgroundColor = JetsnackTheme.colors.uiBackground.copy(alpha = AlphaNearOpaque), + backgroundColor = JetsnackTheme.colors.uiBackground + .copy(alpha = AlphaNearOpaque), contentColor = JetsnackTheme.colors.textSecondary, - contentPadding = WindowInsets.systemBars.only(Horizontal + Top).asPaddingValues(), + contentPadding = WindowInsets.systemBars.only(Horizontal + Top) + .asPaddingValues(), elevation = 0.dp, ) { Text(