mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
feat: add new NeighborInfo config
This commit is contained in:
parent
02af81aeb0
commit
30b7cc90ce
2 changed files with 16 additions and 0 deletions
|
|
@ -11,10 +11,12 @@ import androidx.compose.runtime.saveable.rememberSaveable
|
|||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.LocalFocusManager
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import com.geeksville.mesh.ModuleConfigProtos
|
||||
import com.geeksville.mesh.R
|
||||
import com.geeksville.mesh.copy
|
||||
import com.geeksville.mesh.model.RadioConfigViewModel
|
||||
import com.geeksville.mesh.moduleConfig
|
||||
|
|
@ -80,6 +82,19 @@ fun NeighborInfoConfigItemList(
|
|||
})
|
||||
}
|
||||
|
||||
item {
|
||||
SwitchPreference(
|
||||
title = "Transmit over LoRa",
|
||||
summary = stringResource(id = R.string.config_device_transmitOverLora_summary),
|
||||
checked = neighborInfoInput.transmitOverLora,
|
||||
enabled = enabled,
|
||||
onCheckedChange = {
|
||||
neighborInfoInput = neighborInfoInput.copy { transmitOverLora = it }
|
||||
}
|
||||
)
|
||||
Divider()
|
||||
}
|
||||
|
||||
item {
|
||||
PreferenceFooter(
|
||||
enabled = enabled && neighborInfoInput != neighborInfoConfig,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue