|
@@ -19,7 +19,7 @@ struct ContentView: View {
|
|
|
var body: some View {
|
|
var body: some View {
|
|
|
NavigationSplitView {
|
|
NavigationSplitView {
|
|
|
List(selection: $selection) {
|
|
List(selection: $selection) {
|
|
|
- ForEach(items, id: \.self) { item in
|
|
|
|
|
|
|
+ ForEach(items, id: \.uuid) { item in
|
|
|
NavigationLink(value: item) {
|
|
NavigationLink(value: item) {
|
|
|
Text(item.name)
|
|
Text(item.name)
|
|
|
}.swipeActions(content: {
|
|
}.swipeActions(content: {
|
|
@@ -67,6 +67,7 @@ struct ContentView: View {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private func autosave() {
|
|
private func autosave() {
|
|
|
|
|
+ items.forEach({ $0.uuid = UUID() })
|
|
|
if inPreview {
|
|
if inPreview {
|
|
|
// This isn't great, but we shouldn't be running this in a preview
|
|
// This isn't great, but we shouldn't be running this in a preview
|
|
|
// environment in the first place, so w/e.
|
|
// environment in the first place, so w/e.
|