mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
Fix lat/lng/alt config validation errors when position is null (#1260)
This commit is contained in:
parent
7be602d652
commit
dc9e780663
2 changed files with 12 additions and 11 deletions
|
|
@ -57,6 +57,7 @@ import androidx.navigation.compose.NavHost
|
|||
import androidx.navigation.compose.composable
|
||||
import androidx.navigation.compose.rememberNavController
|
||||
import com.geeksville.mesh.NodeInfo
|
||||
import com.geeksville.mesh.Position
|
||||
import com.geeksville.mesh.R
|
||||
import com.geeksville.mesh.android.Logging
|
||||
import com.geeksville.mesh.config
|
||||
|
|
@ -413,12 +414,12 @@ fun RadioConfigNavHost(
|
|||
}
|
||||
composable(ConfigRoute.POSITION.name) {
|
||||
PositionConfigItemList(
|
||||
location = node?.position,
|
||||
location = node?.position ?: Position(0.0, 0.0, 0),
|
||||
positionConfig = radioConfigState.radioConfig.position,
|
||||
enabled = connected,
|
||||
onSaveClicked = { locationInput, positionInput ->
|
||||
if (positionInput.fixedPosition) {
|
||||
if (locationInput != null && locationInput != node?.position) {
|
||||
if (locationInput != node?.position) {
|
||||
viewModel.setFixedPosition(destNum, locationInput)
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue