refactor: Enable test coverage and update CI (#4233)

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
James Rich 2026-01-15 18:47:45 -06:00 committed by GitHub
parent 45d8f5944a
commit 962137ae4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 140 additions and 126 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Meshtastic LLC
* Copyright (c) 2025-2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -14,7 +14,6 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.meshtastic.core.ui.qr
import androidx.compose.foundation.layout.Arrangement
@ -124,20 +123,10 @@ fun ScannedQrCodeDialog(
remember(channelSet) { mutableStateListOf(elements = Array(size = channelSet.settingsCount, init = { true })) }
val selectedChannelSet =
if (shouldReplace) {
channelSet.copy {
val result = settings.filterIndexed { i, _ -> channelSelections.getOrNull(i) == true }
settings.clear()
settings.addAll(result)
}
} else {
channelSet.copy {
// When adding (not replacing), include all previous channels + selected new channels
val selectedNewChannels =
incoming.settingsList.filterIndexed { i, _ -> channelSelections.getOrNull(i) == true }
settings.clear()
settings.addAll(channels.settingsList + selectedNewChannels)
}
channelSet.copy {
val result = settings.filterIndexed { i, _ -> channelSelections.getOrNull(i) == true }
settings.clear()
settings.addAll(result)
}
// Compute LoRa configuration changes when in replace mode