fix: Only show ValueOneSummary if value is available

Signed-off-by: Myzel394 <50424412+Myzel394@users.noreply.github.com>
This commit is contained in:
Myzel394 2024-07-16 20:41:37 +02:00
parent ad107b0143
commit a07aa51163
No known key found for this signature in database
GPG Key ID: DEC4AAB876F73185

View File

@ -493,15 +493,17 @@ private fun Default(
), ),
) )
ValueOneSummary( if (uiState.result is ConverterResult.Default && uiState.unitTo.factor >= BigDecimal.ZERO) {
modifier = with(density) { ValueOneSummary(
Modifier modifier = with(density) {
.fillMaxWidth() Modifier
.height(dragState.offset.absoluteValue.toDp()) .fillMaxWidth()
.horizontalScroll(rememberScrollState()) .height(dragState.offset.absoluteValue.toDp())
}, .horizontalScroll(rememberScrollState())
uiState = uiState, },
) uiState = uiState,
)
}
Spacer(modifier = Modifier.height(boxWithConstraintsScope.maxHeight * 0.03f)) Spacer(modifier = Modifier.height(boxWithConstraintsScope.maxHeight * 0.03f))