diff --git a/navi-uitron/src/main/java/com/navi/uitron/utils/Ext.kt b/navi-uitron/src/main/java/com/navi/uitron/utils/Ext.kt index 1b41f1c..cc56c57 100644 --- a/navi-uitron/src/main/java/com/navi/uitron/utils/Ext.kt +++ b/navi-uitron/src/main/java/com/navi/uitron/utils/Ext.kt @@ -148,32 +148,28 @@ import org.json.JSONArray import org.json.JSONObject fun Modifier.setHeight(height: String?): Modifier = - this.then( - when (height) { - ComposeSize.MATCH_PARENT.name -> fillMaxHeight() - ComposeSize.WRAP_CONTENT.name -> wrapContentHeight() - ComposeSize.FILL_TO_CONSTRAINTS.name -> this - ComposeSize.INTRINSIC_MIN.name -> height(IntrinsicSize.Min) - ComposeSize.INTRINSIC_MAX.name -> height(IntrinsicSize.Max) - else -> { - height?.toIntOrNull()?.let { height(it.dp) } ?: kotlin.run { wrapContentHeight() } - } + when (height) { + ComposeSize.MATCH_PARENT.name -> fillMaxHeight() + ComposeSize.WRAP_CONTENT.name -> wrapContentHeight() + ComposeSize.FILL_TO_CONSTRAINTS.name -> this + ComposeSize.INTRINSIC_MIN.name -> height(IntrinsicSize.Min) + ComposeSize.INTRINSIC_MAX.name -> height(IntrinsicSize.Max) + else -> { + height?.toIntOrNull()?.let { height(it.dp) } ?: kotlin.run { wrapContentHeight() } } - ) + } fun Modifier.setWidth(width: String?): Modifier = - this.then( - when (width) { - ComposeSize.MATCH_PARENT.name -> fillMaxWidth() - ComposeSize.WRAP_CONTENT.name -> wrapContentWidth() - ComposeSize.FILL_TO_CONSTRAINTS.name -> this - ComposeSize.INTRINSIC_MIN.name -> width(IntrinsicSize.Min) - ComposeSize.INTRINSIC_MAX.name -> width(IntrinsicSize.Max) - else -> { - width?.toIntOrNull()?.let { width(it.dp) } ?: kotlin.run { wrapContentWidth() } - } + when (width) { + ComposeSize.MATCH_PARENT.name -> fillMaxWidth() + ComposeSize.WRAP_CONTENT.name -> wrapContentWidth() + ComposeSize.FILL_TO_CONSTRAINTS.name -> this + ComposeSize.INTRINSIC_MIN.name -> width(IntrinsicSize.Min) + ComposeSize.INTRINSIC_MAX.name -> width(IntrinsicSize.Max) + else -> { + width?.toIntOrNull()?.let { width(it.dp) } ?: kotlin.run { wrapContentWidth() } } - ) + } fun Modifier.setVerticalScroll(scrollData: ScrollData?): Modifier = composed { if (scrollData?.enabled == true) {