On click on title also toggling drawer state
This commit is contained in:
parent
08d6e62a38
commit
a532130fcb
|
@ -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() })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue