From e99a1be54a5172657c4022270a7f5f72f6b2c26d Mon Sep 17 00:00:00 2001 From: Anthony Date: Wed, 1 May 2024 12:21:27 +0100 Subject: [PATCH] refactor(connector): change casing for Composable functions --- .../src/desktopMain/kotlin/tab/procedure/Actions.kt | 12 ++++++------ .../kotlin/tab/procedure/ListProcedures.kt | 8 ++++---- .../desktopMain/kotlin/tab/project/ListProjects.kt | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/connector/composeApp/src/desktopMain/kotlin/tab/procedure/Actions.kt b/connector/composeApp/src/desktopMain/kotlin/tab/procedure/Actions.kt index dc0d6d7..778e16b 100644 --- a/connector/composeApp/src/desktopMain/kotlin/tab/procedure/Actions.kt +++ b/connector/composeApp/src/desktopMain/kotlin/tab/procedure/Actions.kt @@ -83,18 +83,18 @@ class Actions (dbActions: List) : Screen { ) { item { - header() + Header() } items( items = inputs, key = { input -> input.id } ) { item -> - actionItem(item) + ActionItem(item) } item { - footer(navigator, viewModel, screenModel) + Footer(navigator, viewModel, screenModel) } } @@ -112,7 +112,7 @@ class Actions (dbActions: List) : Screen { } @Composable - private fun header() { + private fun Header() { Text( text = "Edit Actions", style = MaterialTheme.typography.headlineSmall @@ -120,7 +120,7 @@ class Actions (dbActions: List) : Screen { } @Composable - private fun actionItem(item: Action) { + private fun ActionItem(item: Action) { Column ( verticalArrangement = Arrangement.spacedBy(itemPadding) ) { @@ -174,7 +174,7 @@ class Actions (dbActions: List) : Screen { @OptIn(ExperimentalResourceApi::class) @Composable - private fun footer(navigator: Navigator, viewModel: InterfaceState, screenModel: ActionsScreenModel) { + private fun Footer(navigator: Navigator, viewModel: InterfaceState, screenModel: ActionsScreenModel) { Row ( Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween diff --git a/connector/composeApp/src/desktopMain/kotlin/tab/procedure/ListProcedures.kt b/connector/composeApp/src/desktopMain/kotlin/tab/procedure/ListProcedures.kt index 4d1a87e..6374787 100644 --- a/connector/composeApp/src/desktopMain/kotlin/tab/procedure/ListProcedures.kt +++ b/connector/composeApp/src/desktopMain/kotlin/tab/procedure/ListProcedures.kt @@ -72,7 +72,7 @@ class ListProcedures ( ) { LazyColumn(state = lazyState) { items(procedures) { procedure -> - procedureItem(procedure, viewModel, screenModel) + ProcedureItem(procedure, viewModel, screenModel) } } VerticalScrollbar( @@ -90,7 +90,7 @@ class ListProcedures ( @OptIn(ExperimentalResourceApi::class) @Composable - private fun procedureItem(procedure: Procedure, viewModel: InterfaceState, screenModel: ActionsScreenModel) { + private fun ProcedureItem(procedure: Procedure, viewModel: InterfaceState, screenModel: ActionsScreenModel) { var expanded by remember { mutableStateOf(false) } Box( @@ -111,7 +111,7 @@ class ListProcedures ( trailingContent = { Icon(painterResource(Res.drawable.expand_more_24px), "Open Procedure Menu") } ) - procedureMenu( + ProcedureMenu( procedure = procedure, viewModel = viewModel, screenModel = screenModel, @@ -124,7 +124,7 @@ class ListProcedures ( } @Composable - private fun procedureMenu( + private fun ProcedureMenu( procedure: Procedure, viewModel: InterfaceState, screenModel: ActionsScreenModel, diff --git a/connector/composeApp/src/desktopMain/kotlin/tab/project/ListProjects.kt b/connector/composeApp/src/desktopMain/kotlin/tab/project/ListProjects.kt index ac05ba9..67b6387 100644 --- a/connector/composeApp/src/desktopMain/kotlin/tab/project/ListProjects.kt +++ b/connector/composeApp/src/desktopMain/kotlin/tab/project/ListProjects.kt @@ -56,7 +56,7 @@ class ListProjects(private val projects: List) : Screen { ) { LazyColumn(state = state) { items(projects) { project -> - projectItem(project, viewModel, tabNavigator) + ProjectItem(project, viewModel, tabNavigator) } } VerticalScrollbar( @@ -74,7 +74,7 @@ class ListProjects(private val projects: List) : Screen { @Composable - private fun projectItem(project: Project, viewModel: InterfaceState, tabNavigator: TabNavigator) { + private fun ProjectItem(project: Project, viewModel: InterfaceState, tabNavigator: TabNavigator) { ListItem( modifier = Modifier .clickable(