From 2756db10ec3affca58372caaa95275add9ce28ca Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Tue, 2 Aug 2022 09:49:11 -0700 Subject: [PATCH] Restrict wifi to devices with wifi --- Meshtastic/Views/Settings/Config/WiFiConfig.swift | 2 +- Meshtastic/Views/Settings/Settings.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Meshtastic/Views/Settings/Config/WiFiConfig.swift b/Meshtastic/Views/Settings/Config/WiFiConfig.swift index f4c1d7d7..246c2e0b 100644 --- a/Meshtastic/Views/Settings/Config/WiFiConfig.swift +++ b/Meshtastic/Views/Settings/Config/WiFiConfig.swift @@ -107,7 +107,7 @@ struct WiFiConfig: View { } } - .disabled(bleManager.connectedPeripheral == nil) + .disabled(!(node != nil && node!.myInfo?.hasWifi ?? false)) Button { diff --git a/Meshtastic/Views/Settings/Settings.swift b/Meshtastic/Views/Settings/Settings.swift index d656b809..e1887074 100644 --- a/Meshtastic/Views/Settings/Settings.swift +++ b/Meshtastic/Views/Settings/Settings.swift @@ -107,7 +107,7 @@ struct Settings: View { Image(systemName: "wifi") .symbolRenderingMode(.hierarchical) - Text("WiFi") + Text("WiFi (ESP32 Only)") } .disabled(bleManager.connectedPeripheral == nil)