refactor(connector): change casing for Composable functions

This commit is contained in:
Anthony
2024-05-01 12:21:27 +01:00
parent 92b14d872f
commit e99a1be54a
3 changed files with 12 additions and 12 deletions

View File

@@ -83,18 +83,18 @@ class Actions (dbActions: List<Action>) : 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<Action>) : Screen {
}
@Composable
private fun header() {
private fun Header() {
Text(
text = "Edit Actions",
style = MaterialTheme.typography.headlineSmall
@@ -120,7 +120,7 @@ class Actions (dbActions: List<Action>) : 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<Action>) : 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

View File

@@ -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,

View File

@@ -56,7 +56,7 @@ class ListProjects(private val projects: List<Project>) : 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<Project>) : Screen {
@Composable
private fun projectItem(project: Project, viewModel: InterfaceState, tabNavigator: TabNavigator) {
private fun ProjectItem(project: Project, viewModel: InterfaceState, tabNavigator: TabNavigator) {
ListItem(
modifier = Modifier
.clickable(