fix: default replace, spotless

pull/2934/head
James Rich 2025-08-31 06:58:26 -05:00
rodzic 9d2c68f216
commit 252a138c64
1 zmienionych plików z 10 dodań i 19 usunięć

Wyświetl plik

@ -142,7 +142,7 @@ fun ChannelScreen(
var showResetDialog by remember { mutableStateOf(false) } var showResetDialog by remember { mutableStateOf(false) }
var shouldAddChannelsState by remember { mutableStateOf(true) } var shouldAddChannelsState by remember { mutableStateOf(false) }
/* Animate waiting for the configurations */ /* Animate waiting for the configurations */
var isWaiting by remember { mutableStateOf(false) } var isWaiting by remember { mutableStateOf(false) }
@ -287,20 +287,18 @@ fun ChannelScreen(
) )
} }
item { item {
SingleChoiceSegmentedButtonRow(modifier = Modifier SingleChoiceSegmentedButtonRow(modifier = Modifier.fillMaxWidth().padding(8.dp)) {
.fillMaxWidth()
.padding(8.dp)) {
SegmentedButton( SegmentedButton(
label = { Text(text = stringResource(R.string.replace)) }, label = { Text(text = stringResource(R.string.replace)) },
onClick = { shouldAddChannelsState = false }, onClick = { shouldAddChannelsState = false },
selected = !shouldAddChannelsState, selected = !shouldAddChannelsState,
shape = SegmentedButtonDefaults.itemShape(0, 2) shape = SegmentedButtonDefaults.itemShape(0, 2),
) )
SegmentedButton( SegmentedButton(
label = { Text(text = stringResource(R.string.add)) }, label = { Text(text = stringResource(R.string.add)) },
onClick = { shouldAddChannelsState = true }, onClick = { shouldAddChannelsState = true },
selected = shouldAddChannelsState, selected = shouldAddChannelsState,
shape = SegmentedButtonDefaults.itemShape(1, 2) shape = SegmentedButtonDefaults.itemShape(1, 2),
) )
} }
} }
@ -489,9 +487,7 @@ private fun ChannelListView(
QrCodeImage( QrCodeImage(
enabled = enabled, enabled = enabled,
channelSet = selectedChannelSet, channelSet = selectedChannelSet,
modifier = Modifier modifier = Modifier.fillMaxWidth().padding(vertical = 4.dp),
.fillMaxWidth()
.padding(vertical = 4.dp),
shouldAddChannel = shouldAddChannel, shouldAddChannel = shouldAddChannel,
) )
}, },
@ -502,18 +498,13 @@ private fun ChannelListView(
private fun ModemPresetInfo(modemPresetName: String, onClick: () -> Unit) { private fun ModemPresetInfo(modemPresetName: String, onClick: () -> Unit) {
Row( Row(
modifier = modifier =
Modifier Modifier.padding(top = 12.dp)
.padding(top = 12.dp) .fillMaxWidth()
.fillMaxWidth() .clickable(onClick = onClick)
.clickable(onClick = onClick) .border(1.dp, MaterialTheme.colorScheme.onBackground, RoundedCornerShape(8.dp)),
.border(1.dp, MaterialTheme.colorScheme.onBackground, RoundedCornerShape(8.dp)),
verticalAlignment = Alignment.CenterVertically, verticalAlignment = Alignment.CenterVertically,
) { ) {
Column( Column(modifier = Modifier.weight(1f).padding(16.dp)) {
modifier = Modifier
.weight(1f)
.padding(16.dp)
) {
Text(text = stringResource(R.string.modem_preset), fontSize = 16.sp) Text(text = stringResource(R.string.modem_preset), fontSize = 16.sp)
Text(text = modemPresetName, fontSize = 14.sp) Text(text = modemPresetName, fontSize = 14.sp)
} }