From aaa9ba64e2ea5e315b9e07374e032f1d76238329 Mon Sep 17 00:00:00 2001 From: SidonieBouthors Date: Sun, 2 Jun 2024 18:05:23 +0200 Subject: [PATCH] style: ktfmt --- .../ui/screens/profile/ProfileScreen.kt | 61 +++++++++---------- 1 file changed, 28 insertions(+), 33 deletions(-) diff --git a/app/src/main/java/com/github/se/assocify/ui/screens/profile/ProfileScreen.kt b/app/src/main/java/com/github/se/assocify/ui/screens/profile/ProfileScreen.kt index fc31f1f0a..7bce503d7 100644 --- a/app/src/main/java/com/github/se/assocify/ui/screens/profile/ProfileScreen.kt +++ b/app/src/main/java/com/github/se/assocify/ui/screens/profile/ProfileScreen.kt @@ -215,43 +215,38 @@ fun ProfileScreen(navActions: NavigationActions, viewmodel: ProfileViewModel) { // The below part is association dependent, only available if you're an admin ! if (state.isAdmin) { - Text( - text = "Manage ${state.selectedAssociation.name}", - style = MaterialTheme.typography.titleMedium - ) + Text( + text = "Manage ${state.selectedAssociation.name}", + style = MaterialTheme.typography.titleMedium) - Column( - modifier = - Modifier.fillMaxWidth() - .testTag("manageAssociationList") - .clip(RoundedCornerShape(12.dp)) - ) { + Column( + modifier = + Modifier.fillMaxWidth() + .testTag("manageAssociationList") + .clip(RoundedCornerShape(12.dp))) { AssociationSettings.entries.forEach { s -> - ListItem( - leadingContent = { - Icon( - imageVector = s.getIcon(), - contentDescription = "${s.name} icon" - ) - }, - headlineContent = { Text(text = s.toString()) }, - trailingContent = { - Icon( - imageVector = Icons.AutoMirrored.Filled.ArrowRight, - contentDescription = "Go to ${s.name} settings" - ) - }, - colors = - ListItemDefaults.colors( - containerColor = - MaterialTheme.colorScheme.primaryContainer - ), - modifier = - Modifier.testTag(s.name).clickable { + ListItem( + leadingContent = { + Icon( + imageVector = s.getIcon(), + contentDescription = "${s.name} icon") + }, + headlineContent = { Text(text = s.toString()) }, + trailingContent = { + Icon( + imageVector = Icons.AutoMirrored.Filled.ArrowRight, + contentDescription = "Go to ${s.name} settings") + }, + colors = + ListItemDefaults.colors( + containerColor = + MaterialTheme.colorScheme.primaryContainer), + modifier = + Modifier.testTag(s.name).clickable { navActions.navigateTo(s.getDestination()) - }) + }) } - } + } } // log out button (for everyone)