mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-05 03:57:24 +00:00
fix: keep calculator page content composed while scrolling
This commit is contained in:
1 parent
58b8801c0c
commit
463df58eb9
1 file changed
+40
-44
+40
-44
@@ -27,6 +27,8 @@ import androidx.compose.foundation.background
|
|||||||
import androidx.compose.foundation.border
|
import androidx.compose.foundation.border
|
||||||
import androidx.compose.foundation.clickable
|
import androidx.compose.foundation.clickable
|
||||||
import androidx.compose.foundation.interaction.MutableInteractionSource
|
import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||||
|
import androidx.compose.foundation.rememberScrollState
|
||||||
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
import androidx.compose.foundation.text.BasicTextField
|
import androidx.compose.foundation.text.BasicTextField
|
||||||
@@ -162,59 +164,53 @@ fun CalculatorPage(
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
LazyColumn(
|
Column(
|
||||||
modifier = modifier.fillMaxSize(),
|
modifier = modifier
|
||||||
|
.fillMaxSize()
|
||||||
|
.verticalScroll(rememberScrollState()),
|
||||||
verticalArrangement = Arrangement.spacedBy(10.dp)
|
verticalArrangement = Arrangement.spacedBy(10.dp)
|
||||||
) {
|
) {
|
||||||
if (calculatorTransceivers.size > 1) {
|
if (calculatorTransceivers.size > 1) {
|
||||||
item {
|
FlowRow(
|
||||||
FlowRow(
|
horizontalArrangement = Arrangement.spacedBy(6.dp),
|
||||||
horizontalArrangement = Arrangement.spacedBy(6.dp),
|
verticalArrangement = Arrangement.spacedBy(4.dp),
|
||||||
verticalArrangement = Arrangement.spacedBy(4.dp),
|
modifier = Modifier.fillMaxWidth()
|
||||||
modifier = Modifier.fillMaxWidth()
|
) {
|
||||||
) {
|
calculatorTransceivers.forEach { radio ->
|
||||||
calculatorTransceivers.forEach { radio ->
|
FilterChip(
|
||||||
FilterChip(
|
selected = radio.uuid == selectedTransceiver.uuid,
|
||||||
selected = radio.uuid == selectedTransceiver.uuid,
|
onClick = {
|
||||||
onClick = {
|
if (radio.uuid != selectedUuid) onAction(RadarAction.SelectTransmitter(radio.uuid))
|
||||||
if (radio.uuid != selectedUuid) onAction(RadarAction.SelectTransmitter(radio.uuid))
|
},
|
||||||
},
|
label = {
|
||||||
label = {
|
Text(
|
||||||
Text(
|
text = transceiverTitle(radio),
|
||||||
text = transceiverTitle(radio),
|
maxLines = 1,
|
||||||
maxLines = 1,
|
overflow = TextOverflow.Ellipsis
|
||||||
overflow = TextOverflow.Ellipsis
|
)
|
||||||
)
|
}
|
||||||
}
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
item(key = "calculator_${selectedTransceiver.uuid}") {
|
DopplerFrequencyCalculator(
|
||||||
DopplerFrequencyCalculator(
|
transponder = selectedTransceiver,
|
||||||
transponder = selectedTransceiver,
|
orbitalPos = orbitalPos,
|
||||||
orbitalPos = orbitalPos,
|
modifier = Modifier.fillMaxWidth()
|
||||||
modifier = Modifier.fillMaxWidth()
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
item {
|
HorizontalDivider(
|
||||||
HorizontalDivider(
|
thickness = 1.dp,
|
||||||
thickness = 1.dp,
|
color = MaterialTheme.colorScheme.outline.copy(alpha = 0.3f)
|
||||||
color = MaterialTheme.colorScheme.outline.copy(alpha = 0.3f)
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
item {
|
CwDecoderPanel(
|
||||||
CwDecoderPanel(
|
cw = cw,
|
||||||
cw = cw,
|
onAction = onAction,
|
||||||
onAction = onAction,
|
requestMicPermission = requestMicPermission,
|
||||||
requestMicPermission = requestMicPermission,
|
modifier = Modifier.fillMaxWidth()
|
||||||
modifier = Modifier.fillMaxWidth()
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user