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.
This commit is contained in:
Austin Payne 2024-01-31 23:11:28 -07:00
parent 0c13fe8307
commit 1b51795cf8

View file

@ -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)