sync2
Laurent 1 year ago
parent 12587aabdb
commit 7059cc913b
  1. 1
      LeStorage/StoreCenter.swift
  2. 4
      LeStorage/StoredCollection+Sync.swift
  3. 4
      LeStorage/StoredSingleton.swift

@ -508,7 +508,6 @@ public class StoreCenter {
func synchronizationDelete(id: String, model: String, storeId: String?) {
DispatchQueue.main.async {
do {
let type = try StoreCenter.classFromName(model)

@ -104,8 +104,8 @@ extension StoredCollection: SomeSyncedCollection where T : SyncedStorable {
case is Int64.Type:
return Formatter.number.number(from: id)?.int64Value as? T.ID
default:
print("ID is neither String nor Int")
return nil
fatalError("ID is neither String nor Int")
// return nil
}
}

@ -33,4 +33,8 @@ public class StoredSingleton<T: SyncedStorable>: StoredCollection<T> {
fatalError("method unavailable for StoredSingleton, use update")
}
func addOrUpdateIfNewer(_ instance: T) {
fatalError("method unavailable for StoredSingleton, use update")
}
}

Loading…
Cancel
Save