Fix(TopAppBar): Fix the bug that the TopAppBar can be scrolled and hidden when the search box is opened

This commit is contained in:
2024-08-20 16:54:36 +08:00
parent da4c58b631
commit b115d3d598
3 changed files with 28 additions and 15 deletions

View File

@@ -9,11 +9,11 @@ import top.fatweb.oxygen.toolbox.ui.OxygenAppState
fun OxygenNavHost(
modifier: Modifier = Modifier,
appState: OxygenAppState,
onShowSnackbar: suspend (message: String, action: String?) -> Boolean,
startDestination: String,
isVertical: Boolean,
searchValue: String,
searchCount: Int
searchCount: Int,
onShowSnackbar: suspend (message: String, action: String?) -> Boolean
) {
val navController = appState.navController
NavHost(
@@ -41,13 +41,13 @@ fun OxygenNavHost(
onNavigateToToolView = navController::navigateToToolView,
onNavigateToToolStore = { appState.navigateToTopLevelDestination(TopLevelDestination.ToolStore) }
)
toolViewScreen(
onBackClick = navController::popBackStack
)
starScreen(
isVertical = isVertical,
searchValue = searchValue,
onNavigateToToolView = navController::navigateToToolView
)
toolViewScreen(
onBackClick = navController::popBackStack
)
}
}