From 1b51795cf82e9e1960a6062a292e3de3fdbdc176 Mon Sep 17 00:00:00 2001 From: Austin Payne Date: Wed, 31 Jan 2024 23:11:28 -0700 Subject: [PATCH] fix: offline map type option getting out of sync Fixes a bug where the offline map picker option was getting inverted until another action was taken, e.g. close options, change map type, etc. --- Meshtastic/Views/Nodes/NodeMap.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Meshtastic/Views/Nodes/NodeMap.swift b/Meshtastic/Views/Nodes/NodeMap.swift index 109fc225..96697ddf 100644 --- a/Meshtastic/Views/Nodes/NodeMap.swift +++ b/Meshtastic/Views/Nodes/NodeMap.swift @@ -86,7 +86,7 @@ struct NodeMap: View { Section(header: Text("Map Options")) { Picker(selection: $selectedMapLayer, label: Text("")) { ForEach(MapLayer.allCases, id: \.self) { layer in - if layer == MapLayer.offline && UserDefaults.enableOfflineMaps { + if layer == MapLayer.offline && enableOfflineMaps { Text(layer.localized) } else if layer != MapLayer.offline { Text(layer.localized)