feat #1688: Add UDP mesh toggle (#1689)

Adds a toggle to enable or disable mesh via UDP.
pull/1684/head^2
James Rich 2025-03-18 18:44:39 -05:00 zatwierdzone przez GitHub
rodzic 6720764ed4
commit 451be0b98c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
2 zmienionych plików z 20 dodań i 0 usunięć

Wyświetl plik

@ -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(

Wyświetl plik

@ -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>