From 75a0e4509a70055851b085f3f7293ae1cf48164c Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Sat, 6 Feb 2021 00:55:04 +0100 Subject: Fix performance and undo --- Map/State/AppState.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Map/State/AppState.swift') 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) -- cgit