kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
fix: Conditionally show UDP settings (#1702)
Only show UDP settings if the device has both Ethernet and WiFi.pull/1703/head
rodzic
373cfe7838
commit
8a8ee27ad9
|
@ -277,7 +277,7 @@ fun NetworkConfigItemList(
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
item { Divider() }
|
item { Divider() }
|
||||||
|
if (hasEthernet && hasWifi) {
|
||||||
item {
|
item {
|
||||||
PreferenceCategory(text = stringResource(R.string.udp_config))
|
PreferenceCategory(text = stringResource(R.string.udp_config))
|
||||||
}
|
}
|
||||||
|
@ -289,12 +289,14 @@ fun NetworkConfigItemList(
|
||||||
enabled = enabled,
|
enabled = enabled,
|
||||||
onCheckedChange = {
|
onCheckedChange = {
|
||||||
networkInput =
|
networkInput =
|
||||||
networkInput.copy { if (it) enabledProtocols = 1 else enabledProtocols = 0 }
|
networkInput.copy {
|
||||||
|
if (it) enabledProtocols = 1 else enabledProtocols = 0
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
item { Divider() }
|
item { Divider() }
|
||||||
|
}
|
||||||
item {
|
item {
|
||||||
PreferenceFooter(
|
PreferenceFooter(
|
||||||
enabled = enabled && networkInput != networkConfig,
|
enabled = enabled && networkInput != networkConfig,
|
||||||
|
|
Ładowanie…
Reference in New Issue