aboutsummaryrefslogtreecommitdiff
path: root/Map/Presentation/Commands
diff options
context:
space:
mode:
Diffstat (limited to 'Map/Presentation/Commands')
-rw-r--r--Map/Presentation/Commands/MapCommands.swift8
1 files changed, 5 insertions, 3 deletions
diff --git a/Map/Presentation/Commands/MapCommands.swift b/Map/Presentation/Commands/MapCommands.swift
index 2d9809d..a298956 100644
--- a/Map/Presentation/Commands/MapCommands.swift
+++ b/Map/Presentation/Commands/MapCommands.swift
@@ -17,9 +17,11 @@ import UniformTypeIdentifiers
struct MapCommands: Commands {
- @AppStorage("viewStyle") var viewStyle: ViewStyle = .horizontal
- @AppStorage("zoom") var zoom = 1.0
- @AppStorage("mapTemplates") private var templatesData: Data = Data()
+ @AppStorage("viewStyle") var viewStyle: ViewStyle =
+ ViewStyle(rawValue: UserPreferences.Defaults.viewStyle) ?? .horizontal
+ @AppStorage("zoom") var zoom = UserPreferences.Defaults.zoom
+ @AppStorage("mapTemplates") private var templatesData: Data = UserPreferences.Defaults
+ .mapTemplates
@FocusedBinding(\.document) var document: MapDocument?
@FocusedValue(\.fileURL) var url: URL?
@FocusedBinding(\.selectedEvolution) var selectedEvolution: StageType?