aboutsummaryrefslogtreecommitdiff
path: root/Map/Views
diff options
context:
space:
mode:
authorRuben Beltran del Rio <ruben@unlimited.pizza>2021-02-05 00:23:05 +0100
committerRuben Beltran del Rio <ruben@unlimited.pizza>2021-02-05 00:23:05 +0100
commit91fd86189477e6c690c6487d51d80bc58c8ecb63 (patch)
tree3817b2572037deab029cd0c1b99d936ee1abcf45 /Map/Views
parent144167621e845b05df55a9f2f00c4bc270d42b55 (diff)
Make delete a context action
Diffstat (limited to 'Map/Views')
-rw-r--r--Map/Views/ContentView.swift6
1 files changed, 6 insertions, 0 deletions
diff --git a/Map/Views/ContentView.swift b/Map/Views/ContentView.swift
index cf1f145..f439026 100644
--- a/Map/Views/ContentView.swift
+++ b/Map/Views/ContentView.swift
@@ -37,6 +37,11 @@ struct ContentView: View {
.foregroundColor(Color.black)
.cornerRadius(2.0)
}.padding(.leading, 8.0)
+ }.contextMenu {
+ Button(action: { store.send(.deleteMap(map: map))}) {
+ Image(systemName: "trash")
+ Text("Delete")
+ }
}
}
.onDelete(perform: deleteMaps)
@@ -51,6 +56,7 @@ struct ContentView: View {
}
}
}
+ DefaultMapView()
}
}