@@ -45,6 +45,7 @@ import com.st.ui.theme.PreviewBlueMSTheme
4545fun VespucciHsdlTags (
4646 modifier : Modifier = Modifier ,
4747 acquisitionInfo : String ,
48+ isLoading : Boolean ,
4849 isLogging : Boolean ,
4950 vespucciTags : Map <String , Boolean >,
5051 onTagChangeState : (String , Boolean ) -> Unit = { _, _ -> /* *NOOP**/ }
@@ -66,6 +67,7 @@ fun VespucciHsdlTags(
6667 Spacer (modifier = Modifier .height(height = LocalDimensions .current.paddingMedium))
6768
6869 TagsInfo (
70+ isLoading = isLoading,
6971 isLogging = isLogging,
7072 vespucciTags = vespucciTags,
7173 onTagChangeState = onTagChangeState
@@ -168,6 +170,7 @@ fun AcquisitionInfo(
168170@Composable
169171fun TagsInfo (
170172 modifier : Modifier = Modifier ,
173+ isLoading : Boolean ,
171174 isLogging : Boolean ,
172175 vespucciTags : Map <String , Boolean > = emptyMap(),
173176 onTagChangeState : (String , Boolean ) -> Unit = { _, _ -> /* *NOOP**/ }
@@ -222,7 +225,7 @@ fun TagsInfo(
222225 vespucciTags.forEach { tag ->
223226 TagListItem (
224227 tag = tag.key,
225- isEnabled = isLogging,
228+ isEnabled = isLogging && isLoading. not () ,
226229 isChecked = tag.value,
227230 onCheckChange = { checked ->
228231 onTagChangeState(tag.key, checked)
@@ -293,6 +296,7 @@ private fun VespucciHsdlTagsPreview() {
293296 VespucciHsdlTags (
294297 acquisitionInfo = " Fri May 26 2023 13:47:27" ,
295298 isLogging = false ,
299+ isLoading = false ,
296300 vespucciTags = mapOf (" Prova" to true , " Test" to false , " Mock" to true )
297301 )
298302 }
@@ -305,6 +309,20 @@ private fun VespucciHsdlTagsLoggingPreview() {
305309 VespucciHsdlTags (
306310 acquisitionInfo = " Fri May 26 2023 13:47:27" ,
307311 isLogging = true ,
312+ isLoading = false ,
313+ vespucciTags = mapOf (" Prova" to true , " Test" to false , " Mock" to true )
314+ )
315+ }
316+ }
317+
318+ @Preview(showBackground = true )
319+ @Composable
320+ private fun VespucciHsdlTagsLoadingPreview () {
321+ PreviewBlueMSTheme {
322+ VespucciHsdlTags (
323+ acquisitionInfo = " Fri May 26 2023 13:47:27" ,
324+ isLogging = false ,
325+ isLoading = true ,
308326 vespucciTags = mapOf (" Prova" to true , " Test" to false , " Mock" to true )
309327 )
310328 }
0 commit comments