diff --git a/Meshtastic/Views/Helpers/ConnectedDevice.swift b/Meshtastic/Views/Helpers/ConnectedDevice.swift index 3a3b6d2a..7e9d1852 100644 --- a/Meshtastic/Views/Helpers/ConnectedDevice.swift +++ b/Meshtastic/Views/Helpers/ConnectedDevice.swift @@ -9,6 +9,7 @@ struct ConnectedDevice: View { var bluetoothOn: Bool var deviceConnected: Bool var name: String + var mqttProxyEnabled: Bool = false var mqttProxyConnected: Bool = false var phoneOnly: Bool = false @@ -18,11 +19,11 @@ struct ConnectedDevice: View { if (phoneOnly && UIDevice.current.userInterfaceIdiom == .phone) || !phoneOnly { if bluetoothOn { - if deviceConnected && mqttProxyConnected { - if mqttProxyConnected { + if deviceConnected && (mqttProxyEnabled || mqttProxyConnected) { + if (mqttProxyConnected || mqttProxyEnabled) { Image(systemName: "iphone.gen3.radiowaves.left.and.right.circle.fill") .imageScale(.large) - .foregroundColor(.green) + .foregroundColor(mqttProxyConnected ? .green : .gray) .symbolRenderingMode(.hierarchical) } } diff --git a/Meshtastic/Views/Messages/ChannelMessageList.swift b/Meshtastic/Views/Messages/ChannelMessageList.swift index 22438b6c..234d705a 100644 --- a/Meshtastic/Views/Messages/ChannelMessageList.swift +++ b/Meshtastic/Views/Messages/ChannelMessageList.swift @@ -156,7 +156,10 @@ struct ChannelMessageList: View { ConnectedDevice( bluetoothOn: bleManager.isSwitchedOn, deviceConnected: bleManager.connectedPeripheral != nil, - name: (bleManager.connectedPeripheral != nil) ? bleManager.connectedPeripheral.shortName : "?") + name: (bleManager.connectedPeripheral != nil) ? bleManager.connectedPeripheral.shortName : "?", + mqttProxyEnabled: channel.uplinkEnabled || channel.downlinkEnabled, + mqttProxyConnected: channel.uplinkEnabled || channel.downlinkEnabled ? bleManager.mqttProxyConnected : false + ) } } }