Added "Neue Überweisung" navigation menu item

This commit is contained in:
dankito 2024-09-05 00:01:58 +02:00
parent 91c75a388d
commit 88ca75460b
1 changed files with 23 additions and 7 deletions

View File

@ -53,6 +53,8 @@ private val iconSize = 24.dp
fun SideMenu(appContent: @Composable () -> Unit) {
val drawerState = uiState.drawerState.collectAsState().value
val accounts = uiState.userAccounts.collectAsState().value
val coroutineScope = rememberCoroutineScope()
ModalDrawer(
@ -97,8 +99,21 @@ fun SideMenu(appContent: @Composable () -> Unit) {
drawerState.close()
}
}
if (accounts.isNotEmpty()) {
Spacer(Modifier.height(12.dp))
NavigationMenuItem(itemModifier, "Neue Überweisung", textColor, horizontalPadding = ItemHorizontalPadding, icon = { Icon(Icons.Filled.Add, "Konto hinzufügen", Modifier.size(iconSize)) }) {
uiState.showTransferMoneyDialog.value = true
coroutineScope.launch {
drawerState.close()
}
}
}
}
if (accounts.isNotEmpty()) {
Divider(color = Colors.DrawerDivider)
Spacer(Modifier.height(12.dp))
@ -112,5 +127,6 @@ fun SideMenu(appContent: @Composable () -> Unit) {
}
}
}
}
)
}