kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
Adds a toggle to enable or disable mesh via UDP.pull/1684/head^2
rodzic
6720764ed4
commit
451be0b98c
|
@ -276,6 +276,24 @@ fun NetworkConfigItemList(
|
|||
networkInput = networkInput.copy { ipv4Config = ipv4 }
|
||||
})
|
||||
}
|
||||
item { Divider() }
|
||||
|
||||
item {
|
||||
PreferenceCategory(text = stringResource(R.string.udp_config))
|
||||
}
|
||||
|
||||
item {
|
||||
SwitchPreference(
|
||||
title = stringResource(R.string.mesh_via_udp_enabled),
|
||||
checked = networkInput.enabledProtocols == 1,
|
||||
enabled = enabled,
|
||||
onCheckedChange = {
|
||||
networkInput =
|
||||
networkInput.copy { if (it) enabledProtocols = 1 else enabledProtocols = 0 }
|
||||
})
|
||||
}
|
||||
|
||||
item { Divider() }
|
||||
|
||||
item {
|
||||
PreferenceFooter(
|
||||
|
|
|
@ -341,4 +341,6 @@
|
|||
<string name="meshtastic_low_battery_notifications">Low battery notifications</string>
|
||||
<string name="low_battery_title">Low battery: %s</string>
|
||||
<string name="meshtastic_low_battery_temporary_remote_notifications">Low battery notifications (favorite nodes)</string>
|
||||
<string name="mesh_via_udp_enabled">Mesh via UDP enabled</string>
|
||||
<string name="udp_config">UDP Config</string>
|
||||
</resources>
|
||||
|
|
Ładowanie…
Reference in New Issue