formatting

This commit is contained in:
Vitor Pamplona 2024-06-12 12:41:31 -04:00
parent a7c06b46a7
commit 77393b433e

View File

@ -457,14 +457,10 @@ fun MainScreen(
} }
@OptIn(ExperimentalAnimationApi::class) @OptIn(ExperimentalAnimationApi::class)
private fun <S> AnimatedContentTransitionScope<S>.topBarTransitionSpec(): ContentTransform { private fun <S> AnimatedContentTransitionScope<S>.topBarTransitionSpec(): ContentTransform = topBarAnimation
return topBarAnimation
}
@OptIn(ExperimentalAnimationApi::class) @OptIn(ExperimentalAnimationApi::class)
private fun <S> AnimatedContentTransitionScope<S>.bottomBarTransitionSpec(): ContentTransform { private fun <S> AnimatedContentTransitionScope<S>.bottomBarTransitionSpec(): ContentTransform = bottomBarAnimation
return bottomBarAnimation
}
@ExperimentalAnimationApi @ExperimentalAnimationApi
val topBarAnimation: ContentTransform = val topBarAnimation: ContentTransform =
@ -588,14 +584,20 @@ private fun WritePermissionButtons(
) { ) {
val currentRoute by val currentRoute by
remember(navEntryState.value) { remember(navEntryState.value) {
derivedStateOf { navEntryState.value?.destination?.route?.substringBefore("?") } derivedStateOf {
navEntryState.value
?.destination
?.route
?.substringBefore("?")
}
} }
when (currentRoute) { when (currentRoute) {
Route.Home.base -> NewNoteButton(accountViewModel, nav) Route.Home.base -> NewNoteButton(accountViewModel, nav)
Route.Message.base -> { Route.Message.base -> {
if ( if (
accountViewModel.settings.windowSizeClass.value?.widthSizeClass == accountViewModel.settings.windowSizeClass.value
?.widthSizeClass ==
WindowWidthSizeClass.Compact WindowWidthSizeClass.Compact
) { ) {
ChannelFabColumn(accountViewModel, nav) ChannelFabColumn(accountViewModel, nav)