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,18 +99,32 @@ 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()
}
}
}
}
Divider(color = Colors.DrawerDivider)
if (accounts.isNotEmpty()) {
Divider(color = Colors.DrawerDivider)
Spacer(Modifier.height(12.dp))
Spacer(Modifier.height(12.dp))
NavigationMenuItem(itemModifier, "Daten exportieren", textColor, horizontalPadding = ItemHorizontalPadding, icon = { Icon(Icons.AutoMirrored.Filled.Send, "Konto hinzufügen", Modifier.size(iconSize)) }) {
coroutineScope.launch {
drawerState.close()
NavigationMenuItem(itemModifier, "Daten exportieren", textColor, horizontalPadding = ItemHorizontalPadding, icon = { Icon(Icons.AutoMirrored.Filled.Send, "Konto hinzufügen", Modifier.size(iconSize)) }) {
coroutineScope.launch {
drawerState.close()
}
uiState.showExportScreen.value = true
}
uiState.showExportScreen.value = true
}
}
}