Using now own snackbarHostState so that we can place StateHandler where we want
This commit is contained in:
parent
2315e4b84a
commit
568b6b8301
|
@ -46,6 +46,8 @@ fun App() {
|
|||
|
||||
val drawerState = DI.uiState.drawerState.collectAsState().value
|
||||
|
||||
val snackbarHostState = remember { SnackbarHostState() }
|
||||
|
||||
val coroutineScope = rememberCoroutineScope()
|
||||
|
||||
coroutineScope.launch {
|
||||
|
@ -55,7 +57,7 @@ fun App() {
|
|||
|
||||
MaterialTheme(colors = colors, typography = typography) {
|
||||
Scaffold(
|
||||
scaffoldState = rememberScaffoldState(drawerState),
|
||||
scaffoldState = rememberScaffoldState(drawerState, snackbarHostState),
|
||||
bottomBar = { BottomBar() },
|
||||
backgroundColor = Colors.Zinc100,
|
||||
floatingActionButton = {
|
||||
|
@ -70,8 +72,6 @@ fun App() {
|
|||
drawerContent = { SideMenuContent() },
|
||||
drawerBackgroundColor = Colors.DrawerContentBackground,
|
||||
snackbarHost = { snackbarHostState ->
|
||||
StateHandler(uiState, snackbarHostState)
|
||||
|
||||
SnackbarHost(
|
||||
hostState = snackbarHostState
|
||||
) { data ->
|
||||
|
@ -93,6 +93,8 @@ fun App() {
|
|||
Column(Modifier.fillMaxSize().padding(scaffoldPadding), horizontalAlignment = Alignment.CenterHorizontally) {
|
||||
TransactionsList(uiState, uiSettings)
|
||||
}
|
||||
|
||||
StateHandler(uiState, snackbarHostState)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue