mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-02-06 05:42:40 -05:00
Adds a toggle to enable or disable mesh via UDP.
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user