mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
Revert "block creation or sending of duplicate channels. " (#3921)
This commit is contained in:
parent
50394b9df0
commit
5e4128d45f
5 changed files with 9 additions and 108 deletions
|
|
@ -96,7 +96,6 @@ import kotlinx.coroutines.launch
|
|||
import org.jetbrains.compose.resources.stringResource
|
||||
import org.meshtastic.core.model.Channel
|
||||
import org.meshtastic.core.model.util.getChannelUrl
|
||||
import org.meshtastic.core.model.util.hasDuplicateKeys
|
||||
import org.meshtastic.core.model.util.qrCode
|
||||
import org.meshtastic.core.model.util.toChannelSet
|
||||
import org.meshtastic.core.navigation.Route
|
||||
|
|
@ -108,7 +107,6 @@ import org.meshtastic.core.strings.are_you_sure_change_default
|
|||
import org.meshtastic.core.strings.cancel
|
||||
import org.meshtastic.core.strings.cant_change_no_radio
|
||||
import org.meshtastic.core.strings.channel_invalid
|
||||
import org.meshtastic.core.strings.channel_key_already_in_use
|
||||
import org.meshtastic.core.strings.copy
|
||||
import org.meshtastic.core.strings.edit
|
||||
import org.meshtastic.core.strings.modem_preset
|
||||
|
|
@ -233,12 +231,6 @@ fun ChannelScreen(
|
|||
|
||||
// Send new channel settings to the device
|
||||
fun installSettings(newChannelSet: ChannelSet) {
|
||||
// Check for duplicate keys before installing
|
||||
if (newChannelSet.hasDuplicateKeys()) {
|
||||
scope.launch { context.showToast(Res.string.channel_key_already_in_use) }
|
||||
return
|
||||
}
|
||||
|
||||
// Try to change the radio, if it fails, tell the user why and throw away their edits
|
||||
try {
|
||||
viewModel.setChannels(newChannelSet)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue