]> git.r.bdr.sh - rbdr/map/blobdiff - Map/State/AppState.swift
Fix performance and undo
[rbdr/map] / Map / State / AppState.swift
index f0620512c342a062761979b8f545e90e0b96a544..c261725fbae1eb22c893f9d8c886489ab0febab5 100644 (file)
@@ -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)