mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-02-16 10:42:50 -05:00
fix(mqtt): enable TLS when using official mqtt server (#3088)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
@@ -160,10 +160,13 @@ fun MQTTConfigItemList(
|
||||
item { HorizontalDivider() }
|
||||
|
||||
item {
|
||||
val defaultAddress = stringResource(R.string.default_mqtt_address)
|
||||
val isDefault = mqttInput.address.isEmpty() || mqttInput.address.contains(defaultAddress)
|
||||
val enforceTls = isDefault && mqttInput.proxyToClientEnabled
|
||||
SwitchPreference(
|
||||
title = stringResource(R.string.tls_enabled),
|
||||
checked = mqttInput.tlsEnabled,
|
||||
enabled = enabled,
|
||||
checked = mqttInput.tlsEnabled || enforceTls,
|
||||
enabled = enabled && !enforceTls,
|
||||
onCheckedChange = { mqttInput = mqttInput.copy { tlsEnabled = it } },
|
||||
)
|
||||
}
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
<string name="some_username" translatable="false">SKH</string>
|
||||
<string name="sample_message" translatable="false">hey I found the cache, it is over here next to the big tiger. I\'m kinda scared.</string>
|
||||
|
||||
<string name="default_mqtt_address" translatable="false">mqtt.meshtastic.org</string>
|
||||
|
||||
<string name="fallback_node_name">Meshtastic %s</string>
|
||||
<string name="node_filter_placeholder">Filter</string>
|
||||
<string name="desc_node_filter_clear">clear node filter</string>
|
||||
|
||||
Reference in New Issue
Block a user