From 6e7dc82098fb7a3ed255c53b004768e7fb211ff5 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Tue, 28 May 2024 14:21:50 -0700 Subject: [PATCH] Dont show the mqtt icon if you doint have either uplink or downlink enabled --- Meshtastic/Views/Helpers/ConnectedDevice.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Meshtastic/Views/Helpers/ConnectedDevice.swift b/Meshtastic/Views/Helpers/ConnectedDevice.swift index 6a33a970..2a96d526 100644 --- a/Meshtastic/Views/Helpers/ConnectedDevice.swift +++ b/Meshtastic/Views/Helpers/ConnectedDevice.swift @@ -22,7 +22,9 @@ struct ConnectedDevice: View { if (phoneOnly && UIDevice.current.userInterfaceIdiom == .phone) || !phoneOnly { if bluetoothOn { if deviceConnected { - MQTTIcon(connected: mqttProxyConnected, uplink: mqttUplinkEnabled, downlink: mqttDownlinkEnabled, topic: mqttTopic) + if (mqttUplinkEnabled || mqttDownlinkEnabled) { + MQTTIcon(connected: mqttProxyConnected, uplink: mqttUplinkEnabled, downlink: mqttDownlinkEnabled, topic: mqttTopic) + } Image(systemName: "antenna.radiowaves.left.and.right.circle.fill") .imageScale(.large) .foregroundColor(.green)