From 104cdd58f908fb6c49dbb1635ecb66672af07adf Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 8 Apr 2026 13:26:57 -0500 Subject: [PATCH] Fix visibility Co-authored-by: garthvh <1795163+garthvh@users.noreply.github.com> --- Localizable.xcstrings | 3 +++ .../Config/Module/TAKModuleConfig.swift | 17 +++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Localizable.xcstrings b/Localizable.xcstrings index 27047cb7..34a26370 100644 --- a/Localizable.xcstrings +++ b/Localizable.xcstrings @@ -29054,6 +29054,9 @@ } } } + }, + "Loading TAK config from the node." : { + }, "Local Network Access" : { "comment" : "A label displayed above the options for local network access.", diff --git a/Meshtastic/Views/Settings/Config/Module/TAKModuleConfig.swift b/Meshtastic/Views/Settings/Config/Module/TAKModuleConfig.swift index 56803bb8..8125956f 100644 --- a/Meshtastic/Views/Settings/Config/Module/TAKModuleConfig.swift +++ b/Meshtastic/Views/Settings/Config/Module/TAKModuleConfig.swift @@ -30,15 +30,20 @@ struct TAKModuleConfig: View { return DeviceRoles(rawValue: Int(role)) } - private var isConnectedNode: Bool { - guard let node else { return false } - return node.num == accessoryManager.activeDeviceNum - } - var body: some View { Form { ConfigHeader(title: "TAK", config: \.takConfig, node: node, onAppear: setTAKValues) + if accessoryManager.isConnected, node?.takConfig == nil { + Section { + HStack(spacing: 12) { + ProgressView() + Text("Loading TAK config from the node.") + .foregroundColor(.secondary) + } + } + } + if let deviceRole, deviceRole != .tak && deviceRole != .takTracker { Section { Text("These settings only apply when the device role is TAK or TAK Tracker.") @@ -79,7 +84,7 @@ struct TAKModuleConfig: View { .font(.callout) } } - .disabled(!accessoryManager.isConnected || (!isConnectedNode && node?.takConfig == nil)) + .disabled(!accessoryManager.isConnected || node?.takConfig == nil) .safeAreaInset(edge: .bottom, alignment: .center) { HStack(spacing: 0) { SaveConfigButton(node: node, hasChanges: $hasChanges) {