From 3b956666dd6a369428699aba72b6d038c6ba2f5d Mon Sep 17 00:00:00 2001 From: = Date: Tue, 30 Jan 2024 13:58:25 +0100 Subject: [PATCH] update: [ANDROAPP-4826] code formated, infobar added --- form/src/main/java/org/dhis2/form/ui/Form.kt | 23 ++++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/form/src/main/java/org/dhis2/form/ui/Form.kt b/form/src/main/java/org/dhis2/form/ui/Form.kt index 9fcdb8d8cc..0f60814b11 100644 --- a/form/src/main/java/org/dhis2/form/ui/Form.kt +++ b/form/src/main/java/org/dhis2/form/ui/Form.kt @@ -70,17 +70,17 @@ fun Form( if (sections.isNotEmpty()) { val focusNext = remember { mutableStateOf(false) } LazyColumn( - modifier = Modifier - .fillMaxSize() - .background(Color.White) - .clickable( - interactionSource = MutableInteractionSource(), - indication = null, - onClick = { focusManager.clearFocus() }, - ), - contentPadding = PaddingValues(horizontal = 16.dp, vertical = 16.dp), - state = scrollState, - ) { + modifier = Modifier + .fillMaxSize() + .background(Color.White) + .clickable( + interactionSource = MutableInteractionSource(), + indication = null, + onClick = { focusManager.clearFocus() }, + ), + contentPadding = PaddingValues(horizontal = 16.dp, vertical = 16.dp), + state = scrollState, + ) { this.itemsIndexed( items = sections, key = { _, fieldUiModel -> fieldUiModel.uid }, @@ -220,7 +220,6 @@ private fun LaunchIfTrue(key: Boolean, block: suspend CoroutineScope.() -> Unit) } - private fun getNextSection(section: FormSection, sections: List): FormSection? { val currentIndex = sections.indexOf(section) if (currentIndex != -1 && currentIndex < sections.size - 1) {