diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2021-02-06 00:55:04 +0100 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2021-02-06 00:55:04 +0100 |
| commit | 75a0e4509a70055851b085f3f7293ae1cf48164c (patch) | |
| tree | b2933b23235b83cb9f5f2d9fd42c8028650ad1d6 /Map/State/AppState.swift | |
| parent | 91fd86189477e6c690c6487d51d80bc58c8ecb63 (diff) | |
Fix performance and undo1.2.0
Diffstat (limited to 'Map/State/AppState.swift')
| -rw-r--r-- | Map/State/AppState.swift | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Map/State/AppState.swift b/Map/State/AppState.swift index f062051..c261725 100644 --- a/Map/State/AppState.swift +++ b/Map/State/AppState.swift @@ -38,7 +38,8 @@ func appStateReducer(state: inout AppState, action: AppAction) { window.makeKeyAndOrderFront(nil) let renderView = MapRenderView( - content: map.content ?? "", evolution: Stage.stages(state.selectedEvolution)) + content: Binding.constant(map.content ?? ""), + evolution: Binding.constant(Stage.stages(state.selectedEvolution))) let view = NSHostingView(rootView: renderView) window.contentView = view @@ -91,7 +92,7 @@ func appStateReducer(state: inout AppState, action: AppAction) { print("Cancel") } } - case .deleteMap(map: let map): + case .deleteMap(let map): let context = PersistenceController.shared.container.viewContext context.delete(map) |