Explorar o código

Clear

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana %!s(int64=2) %!d(string=hai) anos
pai
achega
2517321276
Modificáronse 1 ficheiros con 2 adicións e 10 borrados
  1. 2 10
      iOSClient/Data/NCDatabase.swift

+ 2 - 10
iOSClient/Data/NCDatabase.swift

@@ -246,6 +246,7 @@ class tableDirectEditingCreators: Object {
 
 class tableDashboardWidget: Object {
     
+    @Persisted(primaryKey: true) var index = ""
     @Persisted var account = ""
     @Persisted var id = ""
     @Persisted var title = ""
@@ -254,25 +255,16 @@ class tableDashboardWidget: Object {
     @Persisted var iconUrl: String?
     @Persisted var widgetUrl: String?
     let button = List<tableDashboardWidgetButton>()
-    @Persisted var index = ""
-    
-    override static func primaryKey() -> String {
-        return "index"
-    }
 }
 
 class tableDashboardWidgetButton: Object {
 
+    @Persisted(primaryKey: true) var index = ""
     @Persisted var account = ""
     @Persisted var id = ""
     @Persisted var type = ""
     @Persisted var text = ""
     @Persisted var link = ""
-    @Persisted var index = ""
-
-    override static func primaryKey() -> String {
-        return "index"
-    }
 }
 
 class tableDirectEditingEditors: Object {