Fix scroll

This commit is contained in:
Hinton 2024-10-23 09:09:04 -07:00
parent c88157fbce
commit dc7fca0311
No known key found for this signature in database
GPG key ID: 5F7295599C5D965C

View file

@ -194,7 +194,7 @@ private fun VaultScreenScaffold(
var shouldShowExitConfirmationDialog by rememberSaveable { mutableStateOf(false) } var shouldShowExitConfirmationDialog by rememberSaveable { mutableStateOf(false) }
val scrollBehavior = TopAppBarDefaults.pinnedScrollBehavior( val scrollBehavior = TopAppBarDefaults.pinnedScrollBehavior(
state = rememberTopAppBarState(), state = rememberTopAppBarState(),
canScroll = { !accountMenuVisible }, canScroll = { !accountMenuVisible && !notificationMenuVisible },
) )
// Dynamic dialogs // Dynamic dialogs
@ -278,7 +278,7 @@ private fun VaultScreenScaffold(
}, },
floatingActionButton = { floatingActionButton = {
AnimatedVisibility( AnimatedVisibility(
visible = state.viewState.hasFab && !accountMenuVisible, visible = state.viewState.hasFab && !accountMenuVisible && !notificationMenuVisible,
enter = scaleIn(), enter = scaleIn(),
exit = scaleOut(), exit = scaleOut(),
) { ) {
@ -380,7 +380,7 @@ private fun VaultScreenScaffold(
isVisible = notificationMenuVisible, isVisible = notificationMenuVisible,
notificationSummaries = state.notificationSummaries.toImmutableList(), notificationSummaries = state.notificationSummaries.toImmutableList(),
onNotificationClick = {}, onNotificationClick = {},
onDismissRequest = { updateAccountMenuVisibility(false) }, onDismissRequest = { updateNotificationMenuVisibility(false) },
topAppBarScrollBehavior = scrollBehavior, topAppBarScrollBehavior = scrollBehavior,
modifier = outerModifier, modifier = outerModifier,
) )