diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/appskeleton/BottomBar.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/appskeleton/BottomBar.kt index 50fb0a4..32a0371 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/appskeleton/BottomBar.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/appskeleton/BottomBar.kt @@ -40,12 +40,17 @@ fun BottomBar(showMenuDrawer: Boolean = true) { val coroutineScope = rememberCoroutineScope() + fun toggleDrawerState() { + coroutineScope.launch { + uiState.drawerState.value.toggle() + } + } + + BottomAppBar { if (showMenuDrawer) { IconButton( - onClick = { coroutineScope.launch { - uiState.drawerState.value.toggle() - } } + onClick = { toggleDrawerState() } ) { Icon(Icons.Filled.Menu, contentDescription = "Open Navigation Drawer with sidebar menu") } @@ -68,7 +73,7 @@ fun BottomBar(showMenuDrawer: Boolean = true) { selectedAccount.bank.displayName } - Text(title, color = color, maxLines = 1, overflow = TextOverflow.Ellipsis) + Text(title, color = color, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.clickable { toggleDrawerState() }) } }