4 Commity d70e45db28 ... 917c329968

Autor SHA1 Wiadomość Data
  Sam Jaffe 917c329968 refactor: generate new UUID whenever calling init() 2 tygodni temu
  Sam Jaffe 2bc33d4e38 refactor: properly set sortOrder when deserializing 2 tygodni temu
  Sam Jaffe d70e45db28 refactor: generate new UUID whenever calling init() 2 tygodni temu
  Sam Jaffe b9254c06b2 refactor: properly set sortOrder when deserializing 2 tygodni temu
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      Todos/View/ContentView.swift

+ 1 - 0
Todos/View/ContentView.swift

@@ -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.