mirror of
https://github.com/smyalygames/checklist-tester.git
synced 2025-11-30 01:39:38 +01:00
refactor(connector): change casing for Composable functions
This commit is contained in:
@@ -83,18 +83,18 @@ class Actions (dbActions: List<Action>) : Screen {
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
item {
|
item {
|
||||||
header()
|
Header()
|
||||||
}
|
}
|
||||||
|
|
||||||
items(
|
items(
|
||||||
items = inputs,
|
items = inputs,
|
||||||
key = { input -> input.id }
|
key = { input -> input.id }
|
||||||
) { item ->
|
) { item ->
|
||||||
actionItem(item)
|
ActionItem(item)
|
||||||
}
|
}
|
||||||
|
|
||||||
item {
|
item {
|
||||||
footer(navigator, viewModel, screenModel)
|
Footer(navigator, viewModel, screenModel)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ class Actions (dbActions: List<Action>) : Screen {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
private fun header() {
|
private fun Header() {
|
||||||
Text(
|
Text(
|
||||||
text = "Edit Actions",
|
text = "Edit Actions",
|
||||||
style = MaterialTheme.typography.headlineSmall
|
style = MaterialTheme.typography.headlineSmall
|
||||||
@@ -120,7 +120,7 @@ class Actions (dbActions: List<Action>) : Screen {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
private fun actionItem(item: Action) {
|
private fun ActionItem(item: Action) {
|
||||||
Column (
|
Column (
|
||||||
verticalArrangement = Arrangement.spacedBy(itemPadding)
|
verticalArrangement = Arrangement.spacedBy(itemPadding)
|
||||||
) {
|
) {
|
||||||
@@ -174,7 +174,7 @@ class Actions (dbActions: List<Action>) : Screen {
|
|||||||
|
|
||||||
@OptIn(ExperimentalResourceApi::class)
|
@OptIn(ExperimentalResourceApi::class)
|
||||||
@Composable
|
@Composable
|
||||||
private fun footer(navigator: Navigator, viewModel: InterfaceState, screenModel: ActionsScreenModel) {
|
private fun Footer(navigator: Navigator, viewModel: InterfaceState, screenModel: ActionsScreenModel) {
|
||||||
Row (
|
Row (
|
||||||
Modifier.fillMaxWidth(),
|
Modifier.fillMaxWidth(),
|
||||||
horizontalArrangement = Arrangement.SpaceBetween
|
horizontalArrangement = Arrangement.SpaceBetween
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ class ListProcedures (
|
|||||||
) {
|
) {
|
||||||
LazyColumn(state = lazyState) {
|
LazyColumn(state = lazyState) {
|
||||||
items(procedures) { procedure ->
|
items(procedures) { procedure ->
|
||||||
procedureItem(procedure, viewModel, screenModel)
|
ProcedureItem(procedure, viewModel, screenModel)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
VerticalScrollbar(
|
VerticalScrollbar(
|
||||||
@@ -90,7 +90,7 @@ class ListProcedures (
|
|||||||
|
|
||||||
@OptIn(ExperimentalResourceApi::class)
|
@OptIn(ExperimentalResourceApi::class)
|
||||||
@Composable
|
@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) }
|
var expanded by remember { mutableStateOf(false) }
|
||||||
|
|
||||||
Box(
|
Box(
|
||||||
@@ -111,7 +111,7 @@ class ListProcedures (
|
|||||||
trailingContent = { Icon(painterResource(Res.drawable.expand_more_24px), "Open Procedure Menu") }
|
trailingContent = { Icon(painterResource(Res.drawable.expand_more_24px), "Open Procedure Menu") }
|
||||||
)
|
)
|
||||||
|
|
||||||
procedureMenu(
|
ProcedureMenu(
|
||||||
procedure = procedure,
|
procedure = procedure,
|
||||||
viewModel = viewModel,
|
viewModel = viewModel,
|
||||||
screenModel = screenModel,
|
screenModel = screenModel,
|
||||||
@@ -124,7 +124,7 @@ class ListProcedures (
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
private fun procedureMenu(
|
private fun ProcedureMenu(
|
||||||
procedure: Procedure,
|
procedure: Procedure,
|
||||||
viewModel: InterfaceState,
|
viewModel: InterfaceState,
|
||||||
screenModel: ActionsScreenModel,
|
screenModel: ActionsScreenModel,
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ class ListProjects(private val projects: List<Project>) : Screen {
|
|||||||
) {
|
) {
|
||||||
LazyColumn(state = state) {
|
LazyColumn(state = state) {
|
||||||
items(projects) { project ->
|
items(projects) { project ->
|
||||||
projectItem(project, viewModel, tabNavigator)
|
ProjectItem(project, viewModel, tabNavigator)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
VerticalScrollbar(
|
VerticalScrollbar(
|
||||||
@@ -74,7 +74,7 @@ class ListProjects(private val projects: List<Project>) : Screen {
|
|||||||
|
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
private fun projectItem(project: Project, viewModel: InterfaceState, tabNavigator: TabNavigator) {
|
private fun ProjectItem(project: Project, viewModel: InterfaceState, tabNavigator: TabNavigator) {
|
||||||
ListItem(
|
ListItem(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.clickable(
|
.clickable(
|
||||||
|
|||||||
Reference in New Issue
Block a user