mirror of
https://github.com/owenlejeune/TVTime.git
synced 2025-11-22 11:40:54 -05:00
hide fab on favourites and settings screen
This commit is contained in:
@@ -50,6 +50,9 @@ fun MyApp() {
|
||||
TopAppBarDefaults.exitUntilCollapsedScrollBehavior(decayAnimationSpec)
|
||||
}
|
||||
|
||||
val navBackStackEntry by navController.currentBackStackEntryAsState()
|
||||
val currentRoute = navBackStackEntry?.destination?.route
|
||||
|
||||
Scaffold(
|
||||
modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection),
|
||||
backgroundColor = MaterialTheme.colorScheme.background,
|
||||
@@ -66,7 +69,9 @@ fun MyApp() {
|
||||
)
|
||||
},
|
||||
floatingActionButton = {
|
||||
SearchFab()
|
||||
if (currentRoute in listOf(NavItems.Movies.route, NavItems.TV.route)) {
|
||||
SearchFab()
|
||||
}
|
||||
}
|
||||
) { innerPadding ->
|
||||
Box(modifier = Modifier.padding(innerPadding)) {
|
||||
|
||||
Reference in New Issue
Block a user